Archive for April, 2009

Padding (top, right, bottom, and left), what is in it?

What is “padding” in web design and development? According to w3schools.com, “the CSS padding properties define the space between the element border and the element content. Negative values are not allowed. The top, right, bottom, and left padding can be changed independently using separate properties. A shorthand padding property is also created to control multiple sides at once.”

How about a “margin”? From the definition above, we can say that a “margin” is the space outside the element border and around it.

Now, with regards to padding in browser compatibility issue, they throw different outputs in different browsers. You can have a value of 0 in your code of the padding in Internet Explorer but have a 1[+] value for Firefox. As an example, let’s say we have a bulleted unordered list at the right hand portion of an image which is the left element (positioned at the left). Stick to the fact that the list does not (yet) go down beyond the height of the image on the left. With IE(7), there is no need to define a value of the “padding” or you can set it to 0, that wouldn’t create any misalignment of the elements present with respect to the image on the left and the list on the right. But for FF(3), you would have a [+] value of the padding in the element list. Below is a sample code for IE and FF using CSS.

Unordered list

In these codes, please note that the value of the padding is true and equivalent to its “top”, “right”, “bottom”, and “left” (T,R,B,L) sides. While setting it to in the case of Firefox, will make its “top=5px”, “right=3px”, “bottom=5px”, and “left=3px” respectively.

Did you notice something in the code? We have a missing “ul” tag and its equivalent ending tag “/ul”. What does this relate to the unordered list that we have in our example? If we want an indented list with respect to the element on the left which is the image then we can insert the tag “ul-/ul”. By the way, the browser defaults the list to be an unordered list “ul”. But if we want the list to be aligned with any other element (on the right side per our example) example: text paragraphs then we can omit the “ul-/ul” tag.

Leave a comment »

Mumunting Basura

Naaalala nyo ba yung advertisement sa TV na may mag-ama na magpapark something like sa isang building? Yung may nauna na matanda pero dahil sa mas mabilis yung tatay nung bata eh naunahan nya yung matanda sa pagpark sa slot na kung saan dun din ang tungo nung matanda?

Naisip kong gawin ‘tong entry na ito dito sa blog ko under “halo-halo:Salo-salo” habang binabasa ko yung mga entries sa topic na “Pilipinas Pano Ka Ba Aahunin” sa ULOP (http://www.ulop.net)

Nakakainis (sorry po sa salitang ito) pero ito ang nararamdaman ko pag may nakikita ako o mga taong nakakasabay ko sa mga public vehicles na nagtatapon ng basura, kahit mga mumunting basura sa bintana ng pampublikong sasakyan sa kalsada saan man abutin yung pagtapon nila. I also felt sorry about this people, that it seems they don’t know what just they have done, what will be the effect of this act in the long run.

Ang masama nito (gaya sa commercial na binanggit ko) ay kasama nila mga anak nila.  And the more, it’s them who instruct to their child to throw it out the window of the puv into the streets. Whew! Sana naman, sabi ko sa isip-isip ko hindi nila gawin ito sa harap ng mga bata o ng mga anak nila. Kung sasabihin nila na nakasanayan na nila o naka-”ugat” na sa kanila ang gawaing iyon, huwag naman sa nakikita ng bata.  Isipin sana nila na susunod na henerasyon ang anak nila na pedeng gumawa at gumaya sa nakita nilang gawain ng nakakatanda sa kanila.

Maraming beses na akong nakakakita ng ganitong sitwasyon ilang beses sa isang linggo kung minsan araw-araw.  Kung tutuusin pede naman ibulsa muna ang mga mumunting basura na ito habang nakasakay sa sasakyan o hawakan naman kung imposibleng maibulsa.  Konting panahon sa paghihintay para maibasura sa basurahan, konting minuto o oras para mailagay sa tamang paglalagyan, konting tiyaga para makaiwas sa mas malala pang problema na idudulot nito sa hinaharap. Nagfa-flash back tuloy sa akin ang mga tambak-tambak na basura sa mga lansangan sa Metro Manila.

Sana maisip nila ito, sana maisip natin ito.

Syempre sa puntong ito, nagtatanong na kayo, “ginagawa nya kaya ito. Hindi sa pagbubuhat ng sariling bangko pero pinipilit kong gawin ito sa tuwing nandun ako sa mga sitwasyong ganun at nagtatagumpay naman ako. Kung kaya ng isa, dalawa o tatlong tao, sigurado kaya din ng maramihan hanggang ang lahat ay masanay sa ganitong tamang gawain.

Oo nga pala, malapit na ang Earth Hour (March 28, 2009, 8:30pm-9:30pm), ito ay isa sa mga gawaing maitutulong natin sa ating mahal na bansa, sa ating mundong ginagalawan.

Leave a comment »