Monday, December 5, 2011

December: Pasko Na Naman!

by eturo


December na naman. Meaning ito na ang buwang pinakaantay ng lahat hindi lang dito sa Pilipanas kundi sa buong mundo dahil ito ang buwan kung saan nating ipinagdiriwang ang kaarawan ng ating Panginoong Hesus. Ito ang buwan kung saan lahat ng pamilya sa buong mundo ay magsasama-sama upang gunitain ang pagdating ng Tagapagligatas ng sangkatauhan. Ito ang panahon kung saan ang lahat ay magsasaya, magbibigayan, magkakaisa, at higit sa lahat ay espiritu ng pagmamahalan bawat nilalang sa mundong ito. At kaya nga pagsapit ng ika-25 ng buwang ito, lahat ay nagsasaya dahil sa Kanya.

Dito sa bansa nating Pilipinas, pagsapit palang ng ber-months simula sa buwang September, marami na sa atin ang bumabati sa atin ng "Merry Christmas", "Maligayang Pasko" or kahit sa ano pang istilo ng pagbati natin. Ito ang kultura nating mga Pilipino na kailaman ay di nating kayang baguhin. Ni hindi pa nga natatapos ang "All Saints Day" or "All Souls Day" para sa paggunita natin sa mga mahal natin sa buhay na yumao na pero karamihan sa atin, inuuna na natin ang paglalagay ng mga Christmas decorations sa mga bahay-bahay natin. Marami na sa atin ang naglalagay ng mga Christmas decorations tulad ng mga parol sa mga bintana at pinto ng ating mga bahay. May mga naglalagay na rin ng mga Christmas Tree sa loob ng bahay. Nagsasabit ng mga Christmas lights, si Santa Claus at si Rudolph the Red Nose Reindeer, at kung anu-ano pang bagay na nilalagay nating bilang simbolo sa Christmas. (Kung meron pa sanang snow dito sa Pilipinas, siguro nga naglalakihang Snowman ang ilalagay natin sa harapan ng bahay.)

Lalo na ring lumalamig ang simoy ng hangin, hudyat lamang ito na talagang Pasko (Christmas) na sa atin. May mga bata na ring nagsisimulang mag-ingay sa gabi dahil sa pangangaroling. Marami na ring nagsisiuwian na kamag-anak natin papunta sa mga probinsya or lumuluwas papunta sa mga lungsod. Marami na ring mga Pinoy at Pinay in abroad na simulang magbaksayon na umuwi dito sa Pilipinas at dito nila gugunitain ang Pasko. Sabi nga nila, ang Pasko dito sa ating bansang Pilipinas ang pinakamsaya sa buong nundo. Kaya nga, marami sa mga kababayan natin sa abroad ang nauulila sa kanilang mga pamilya sa pagcecelebrate ng Christmas dito sa atin siguro dahil kailangan nilang mag-stay sa kanilang mga trabaho.

Ang Pasko ay isa sa mga pinakamasayang event we celebrate in the whole year round. This is the time kung saan ang lahat ng pamilya ay nagkakaisa at nagmamahalan. Ito ang tunay na espiritu at diwa ng Pasko. Pero sana ang tunay na diwa ng Pasko ay hindi lang sa 25th day of December natin ipakita pero sana gawin natin ito araw-araw at sa buong taon.

So, how many days more to go? Oo nga pala, wag na wag kakalimutan anga mga regalo natin. Sabi nga nila, "The more you give, the more you receive..."

Saturday, November 26, 2011

CSS: Working with Text and Links


by eturo

Text

Formatting and adding style to text is a key issue for any web designer. In this lesson you will be introduced to the amazing opportunities CSS gives you to add layout to text. The following properties will be described:

¤  Text indention [text-indent]
The property text-indent allows you to add an elegant touch to text paragraphs by applying an indent to the first line of the paragraph. In the example below a 30px is applied to all text paragraphs marked with
:
           
            p {
                        text-indent: 30px;
            }
           
           
¤  Text alignment [text-align]
The CSS property text-align corresponds to the attribute align used in old versions of HTML. Text can either be aligned to the left, to the right or centred. In addition to this, the value justify will stretch each line so that both the right and left margins are straight. You know this layout from for example newspapers and magazines.

In the example below the text in table headings is aligned to the right while the table data are centred. In addition, normal text paragraphs are justified:
           
            th {
                        text-align: right;
            }

            td {
                        text-align: center;
            }

            p {
                        text-align: justify;
            }
           
           
¤  Text decoration [text-decoration]
The property text-decoration makes it is possible to add different "decorations" or "effects" to text. For example, you can underline the text, have a line through or above the text, etc. In the following example,

are underlined headlines,

are headlines with a line above the text and

are headlines with a line though the text.
           
            h1 {
                        text-decoration: underline;
            }

            h2 {
                        text-decoration: overline;
            }

            h3 {
                        text-decoration: line-through;
            }
           
           


¤  Letter space [letter-spacing]
The spacing between text characters can be specified using the property letter-spacing. The value of the property is simply the desired width. For example, if you want a spacing of 3px between the letters in a text paragraph
and 6px between letters in headlines

the code below could be used.
           
            h1 {
                        letter-spacing: 6px;
            }

            p {
                        letter-spacing: 3px;
            }
           
¤  Text transformation [text-transform]
The text-transform property controls the capitalization of a text. You can choose to capitalize, use uppercase or lowercase regardless of how the original text is looks in the HTML code.
An example could be the word "headline" which can be presented to the user as "HEADLINE" or "Headline". There are four possible values for text-transform:
o    capitalize
§  Capitalizes the first letter of each word. For example: "john doe" will be "John Doe".
o    uppercase
§  Converts all letters to uppercase. For example: "john doe" will be "JOHN DOE".
o    lowercase
§  Converts all letters to lowercase. For example: "JOHN DOE" will be "john doe".
o    none
§  No transformations - the text is presented as it appears in the HTML code.

As an example, we will use a list of names. The names are all marked with
  • (list-item). Let's say that we want names to be capitalized and headlines to be presented in uppercase letters.
    Try to take a look at the HTML code for this example and you will see that the text actually is in lowercase.
               
                h1 {
                            text-transform: uppercase;
                }

                li {
                            text-transform: capitalize;
                }

  • CSS: Working with Color, Backgrounds and Font

    by eturo


    Colors and Backgrounds

    In this lesson you will learn how to apply colors and background colors to your websites. We will also look at advanced methods to position and control background images. The following CSS properties will be explained:


    ¤  Foreground color: the 'color' property

    The color property describes the foreground color of an element. For example, imagine that we want all headlines in a document to be dark red. The headlines are all marked with the HTML element

    . The code below sets the color of

    elements to red.
               
                h1 {
                            color: #ff0000;
                }
               
    Colors can be entered as hexadecimal values as in the example above (#ff0000), or you can use the names of the colors ("red") or rgb-values (rgb(255,0,0)).

    ¤  The 'background-color' property

    The background-color property describes the background color of elements. The element contains all the content of an HTML document. Thus, to change the background color of an entire page, the background-color property should be applied to the element.

    You can also apply background colors to other elements including headlines and text. In the example below, different background colors are applied to and

    elements.
               
                body {
                            background-color: #FFCC66;
                }

                h1 {
                            color: #990000;
                            background-color: #FC9804;
                }
               
    Notice that we applied two properties to

    by dividing them by a semicolon.

    ¤  Background images [background-image]

    The CSS property background-image is used to insert a background image. As an example of a background image, we use the butterfly below.

    To insert the image of the butterfly as a background image for a web page, simply apply the background-image property to and specify the location of the image.
               
                body {
                            background-color: #FFCC66;
                            background-image: url("butterfly.gif");
                }

                h1 {
                            color: #990000;
                            background-color: #FC9804;
                }
               
               
    NB: Notice how we specified the location of the image as url("butterfly.gif"). This means that the image is located in the same folder as the style sheet. You can also refer to images in other folders using url("../images/butterfly.gif") or even on the Internet indicating the full address of the file: url("http://www.html.net/butterfly.gif").

    ¤  Repeat background image [background-repeat]

    In the example above, did you notice that by default the butterfly was repeated both horizontally and vertically to cover the entire screen? The property background-repeat controls this behaviour.

    The table below outlines the four different values for background-repeat.

    Value
    Description
    background-repeat: repeat-x
    The image is repeated horizontally
    background-repeat: repeat-y
    The image is repeated vertically
    background-repeat: repeat
    The image is repeated both horizontally and vertically
    background-repeat: no-repeat
    The image is not repeated

    For example, to avoid repetition of a background image the code should look like this:
               
                body {
                            background-color: #FFCC66;
                            background-image: url("butterfly.gif");
                            background-repeat: no-repeat;
                }

                h1 {
                            color: #990000;
                            background-color: #FC9804;
                }
               
               
    ¤  Lock background image [background-attachment]

    The property background-attachment specifies whether a background picture is fixed or scrolls along with the containing element. A fixed background image will not move with the text when a reader is scrolling the page, whereas an unlocked background image will scroll along with the text of the web page.

    The table below outlines the two different values for background-attachment. Click on the examples to see the difference between scroll and fixed.

    Value
    Description
    Background-attachment: scroll
    The image scrolls with the page - unlocked
    Background-attachment: fixed
    The image is locked

    For example, the code below will fix the background image.
               
                body {
                            background-color: #FFCC66;
                            background-image: url("butterfly.gif");
                            background-repeat: no-repeat;
                            background-attachment: fixed;
                }

                h1 {
                            color: #990000;
                            background-color: #FC9804;
                }
               
               
    ¤  Place background image [background-position]

    By default, a background image will be positioned in the top left corner of the screen. The property background-position allows you to change this default and position the background image anywhere you like on the screen.

    There are numerous ways to set the values of background-position. However, all of them are formatted as a set of coordinates. For example, the value '100px 200px' positions the background image 100px from the left side and 200px from the top of the browser window.

    The coordinates can be indicated as percentages of the browser window, fixed units (pixels, centimetres, etc.) or you can use the words top, bottom, center, left and right. The model below illustrates the system:



    The table below gives some examples.

    Value
    Description
    background-position: 2cm 2cm
    The image is positioned 2 cm from the left and 2 cm down the page
    background-position: 50% 25%
    The image is centrally positioned and one fourth down the page
    background-position: top right
    The image is positioned in the top-right corner of the page

    The code example below positions the background image in the bottom right corner:
               
                body {
                            background-color: #FFCC66;
                            background-image: url("butterfly.gif");
                            background-repeat: no-repeat;
                            background-attachment: fixed;
                            background-position: right bottom;
                }

                h1 {
                            color: #990000;
                            background-color: #FC9804;
                }
               
               
    ¤  Compiling [background]
    The property background is a short hand for all the background properties listed in this lesson.

    With background you can compress several properties and thereby write your style sheet in a shorter way which makes it easier to read.

    For example, look at these five lines:
               
                background-color: #FFCC66;
                background-image: url("butterfly.gif");
                background-repeat: no-repeat;
                background-attachment: fixed;
                background-position: right bottom;
               
               
    Using background the same result can be achieved in just one line of code:
               
                background: #FFCC66 url("butterfly.gif") no-repeat fixed right bottom;
               
               
    The list of order is as follows:

    [background-color] | [background-image] | [background-repeat] |
    [background-attachment] | [background-position]

    If a property is left out, it will automatically be set to its default value. For example, if background-attachment and background-position are taken out of the example:
               
                background: #FFCC66 url("butterfly.gif") no-repeat;
               
    These two properties that are not specified would merely be set to their default values which as you know are scroll and top left.

    Like Us on Facebook

    Related Posts Plugin for WordPress, Blogger...