Have an account?

Feb 9, 2009

20 Useful CSS Tips For Beginners

useful css for beginners

In the old days, we depend a lot of on developers and programmers to help update the website, even when it’s just a minor one. Thanks to the CSS and it’s flexibility, styles can be extract independently away from the codes. Now, with some basic understanding of CSS, even a novice can easily change the style of a website.

Whether you are interested in picking up CSS to create your own website, or merely to tweak your blog’s look and feel a little - it’s always good to start with the fundamentals to gain a stronger foundation. Let’s take a look at some CSS Tips we thought might be useful for beginners. Full list after jump.

  1. Use reset.css

    Be default, browsers like Firefox and Internet Explorer have different ways of rendering styles. reset.css basically reset all fundamental styles, so you start with a foundation with settings that looks exactly the same cross browsers.

    Here are some of the commonly used reset.css frameworks - Yahoo Reset CSS, Eric Meyer’s CSS Reset, Tripoli

  2. Use Shorthand CSS

    Shorthand CSS gives you a shorter way of writing your CSS codes, and most important of all - it makes the code clearner and easier to understand.

    Instead of creating CSS like this

    1. .header {
    2. background-color: #fff;
    3. background-image: url(image.gif);
    4. background-repeat: no-repeat;
    5. background-position: top left;
    6. }

    It can be short-handed into the following:

    1. .header {
    2. background: #fff url(image.gif) no-repeat top left
    3. }

    More - Introduction to CSS Shorthand, Useful CSS shorthand properties

  3. Understanding Class and ID

    These two selectors often confuse beginners. In CSS, class is represented by a dot "." while id is a hash ‘#". In a nutshell id is used on style that is unique and don’t repeat itself, class on the other side, can be re-use.

    More - Class vs. ID | When to use Class, ID | Applying Class and ID together

  4. Power of

  5. a.k.a link list, is very useful when they are use correctly with
      or
        , particulary to style a navigation menu.

        More - Taming Lists, Amazing LI

      • Forget , try

        One of the greatest advantage of CSS is the use of

        to achieve total flexibility in terms of styling.
        are unlike
        , where contents are ‘locked’ within a
        ’s cell. It’s safe to say most layouts are achievable with the use of
        and proper styling, well maybe except massive tabular contents.

        More - Tables are dead, Tables Vs. CSS, CSS vs tables

      • CSS Debugging Tools

        It’s always good to get instant preview of the layout while tweaking the CSS, it helps understanding and debugging CSS styles better. Here are some free CSS debugging tools you can install on your browser: FireFox Web Developer, DOM Inspector, Internet Explorer Developer Toolbar, and Firebug.

      • Avoid Superfluous Selectors

        Sometimes your CSS declaration can be simpler, meaning if you find yourself coding the following:

          1. ul li { ... }
          1. ol li { ... }
          1. table tr td { ... }

        They can be shorten down to just

          1. li { ... }
          1. td { ... }

        Explanation:

      • will only exist within
          or
            and
      • and
        will only be inside
        so there’s really not necessary to re-insert them.

      • Knowing !important

        Any style marked with !important will be taken into use regardlessly if there’s a overwriting rule below it.

        1. .page { background-color:blue !important; background-color:red;}

        In the example above, background-color:blue will be adapted because it’s marked with !important, even when there’s a background-color:red; below it. !important is used in situation where you want to force a style without something overwriting it, however it may not work in Internet Explorer.

      • Replace Text with Image

        This is commonly practice to replace

        title

        from a text based title to an image. Here’s how you do it.

        1. h1 {
        2. text-indent:-9999px;
        3. background:url("title.jpg") no-repeat;
        4. width:100px;
        5. height:50px;
        6. }

        Explanation: text-indent:-9999px; throws your text title off screen, replaced by an image declared by background: {...} with a fixed width and height.

      • Understand CSS Positioning

        The following article gives you a clear understanding in using CSS positioning - position: {...}

        More - Learn CSS Positioning in Ten Steps

      • CSS @import vs

        There are 2 ways to call an external CSS file - respectively using @import and . If you are uncertain which method to use, here’s few articles to help you decide.

        More - Difference Between @import and link

      • Designing Forms in CSS

        Web forms can be easily design and customize with CSS. These following articles show you how:

        More - Table-less form, Form Garden, Styling even more form controls

      • Get Inspired

        If you are looking around for nicely designed CSS-based website for inspiration, or just simply browsing to find some good UI, here are some CSS showcase site we recommend:

        Need more? Here’s a round up of 74 CSS Galleries.

      • Rounded Corners in CSS

        This following article gives you an idea how to create cross-browser compatible rounded borders with CSS.

      • Keep CSS Codes Clean

        If your CSS codes are messy, you are going to end up coding in confusion and having a hard time refereing the previous code. For starters, you can create proper indentation, comment them properly.

        More - 12 Principles For Keeping Your Code Clean, Format CSS Codes Online

      • Typography Measurement: px vs em

        Having problem choosing when to use measurement unit px or em? These following articles might give you a better understanding on the typography units.

        More - Units of Measurement in CSS, CSS Font size explained, Using Points, Pixels, Ems, or Percentages for CSS Fonts

      • CSS Browsers Compatibility Table

        We all know each browser has different ways of rendering CSS styles. It’s good to have a reference, a chart or a list that shows the entire CSS compatibility for each browser.

        CSS support table: #1, #2, #3, #4.

      • Design Multicolumns in CSS

        Having problem getting the left, middle and right column to align properly? Here are some articles that might help:

      • Get a Free CSS Editors

        Dedicated editors are always better than a notepad. Here are some we recommend:

        More - Simple CSS, Notepad ++, A Style CSS Editor

      • Understanding Media Types

        There are few media types when you declare CSS with . print, projection and screen are few of the commonly used types. Understanding and using them in proper ways allow better user accessibility. The following article explains how to deal with CSS Media types.

        More - CSS and Media Types, W3 Media Types, CSS Media Types, CSS2 Media Types

20 Useful CSS Tips For Beginners

useful css for beginners

In the old days, we depend a lot of on developers and programmers to help update the website, even when it’s just a minor one. Thanks to the CSS and it’s flexibility, styles can be extract independently away from the codes. Now, with some basic understanding of CSS, even a novice can easily change the style of a website.

Whether you are interested in picking up CSS to create your own website, or merely to tweak your blog’s look and feel a little - it’s always good to start with the fundamentals to gain a stronger foundation. Let’s take a look at some CSS Tips we thought might be useful for beginners. Full list after jump.

  1. Use reset.css

    Be default, browsers like Firefox and Internet Explorer have different ways of rendering styles. reset.css basically reset all fundamental styles, so you start with a foundation with settings that looks exactly the same cross browsers.

    Here are some of the commonly used reset.css frameworks - Yahoo Reset CSS, Eric Meyer’s CSS Reset, Tripoli

  2. Use Shorthand CSS

    Shorthand CSS gives you a shorter way of writing your CSS codes, and most important of all - it makes the code clearner and easier to understand.

    Instead of creating CSS like this

    1. .header {
    2. background-color: #fff;
    3. background-image: url(image.gif);
    4. background-repeat: no-repeat;
    5. background-position: top left;
    6. }

    It can be short-handed into the following:

    1. .header {
    2. background: #fff url(image.gif) no-repeat top left
    3. }

    More - Introduction to CSS Shorthand, Useful CSS shorthand properties

  3. Understanding Class and ID

    These two selectors often confuse beginners. In CSS, class is represented by a dot "." while id is a hash ‘#". In a nutshell id is used on style that is unique and don’t repeat itself, class on the other side, can be re-use.

    More - Class vs. ID | When to use Class, ID | Applying Class and ID together

  4. Power of

  5. a.k.a link list, is very useful when they are use correctly with
      or
        , particulary to style a navigation menu.

        More - Taming Lists, Amazing LI

      • Forget , try

        One of the greatest advantage of CSS is the use of

        to achieve total flexibility in terms of styling.
        are unlike
        , where contents are ‘locked’ within a
        ’s cell. It’s safe to say most layouts are achievable with the use of
        and proper styling, well maybe except massive tabular contents.

        More - Tables are dead, Tables Vs. CSS, CSS vs tables

      • CSS Debugging Tools

        It’s always good to get instant preview of the layout while tweaking the CSS, it helps understanding and debugging CSS styles better. Here are some free CSS debugging tools you can install on your browser: FireFox Web Developer, DOM Inspector, Internet Explorer Developer Toolbar, and Firebug.

      • Avoid Superfluous Selectors

        Sometimes your CSS declaration can be simpler, meaning if you find yourself coding the following:

          1. ul li { ... }
          1. ol li { ... }
          1. table tr td { ... }

        They can be shorten down to just

          1. li { ... }
          1. td { ... }

        Explanation:

      • will only exist within
          or
            and
      • and
        will only be inside
        so there’s really not necessary to re-insert them.

      • Knowing !important

        Any style marked with !important will be taken into use regardlessly if there’s a overwriting rule below it.

        1. .page { background-color:blue !important; background-color:red;}

        In the example above, background-color:blue will be adapted because it’s marked with !important, even when there’s a background-color:red; below it. !important is used in situation where you want to force a style without something overwriting it, however it may not work in Internet Explorer.

      • Replace Text with Image

        This is commonly practice to replace

        title

        from a text based title to an image. Here’s how you do it.

        1. h1 {
        2. text-indent:-9999px;
        3. background:url("title.jpg") no-repeat;
        4. width:100px;
        5. height:50px;
        6. }

        Explanation: text-indent:-9999px; throws your text title off screen, replaced by an image declared by background: {...} with a fixed width and height.

      • Understand CSS Positioning

        The following article gives you a clear understanding in using CSS positioning - position: {...}

        More - Learn CSS Positioning in Ten Steps

      • CSS @import vs

        There are 2 ways to call an external CSS file - respectively using @import and . If you are uncertain which method to use, here’s few articles to help you decide.

        More - Difference Between @import and link

      • Designing Forms in CSS

        Web forms can be easily design and customize with CSS. These following articles show you how:

        More - Table-less form, Form Garden, Styling even more form controls

      • Get Inspired

        If you are looking around for nicely designed CSS-based website for inspiration, or just simply browsing to find some good UI, here are some CSS showcase site we recommend:

        Need more? Here’s a round up of 74 CSS Galleries.

      • Rounded Corners in CSS

        This following article gives you an idea how to create cross-browser compatible rounded borders with CSS.

      • Keep CSS Codes Clean

        If your CSS codes are messy, you are going to end up coding in confusion and having a hard time refereing the previous code. For starters, you can create proper indentation, comment them properly.

        More - 12 Principles For Keeping Your Code Clean, Format CSS Codes Online

      • Typography Measurement: px vs em

        Having problem choosing when to use measurement unit px or em? These following articles might give you a better understanding on the typography units.

        More - Units of Measurement in CSS, CSS Font size explained, Using Points, Pixels, Ems, or Percentages for CSS Fonts

      • CSS Browsers Compatibility Table

        We all know each browser has different ways of rendering CSS styles. It’s good to have a reference, a chart or a list that shows the entire CSS compatibility for each browser.

        CSS support table: #1, #2, #3, #4.

      • Design Multicolumns in CSS

        Having problem getting the left, middle and right column to align properly? Here are some articles that might help:

      • Get a Free CSS Editors

        Dedicated editors are always better than a notepad. Here are some we recommend:

        More - Simple CSS, Notepad ++, A Style CSS Editor

      • Understanding Media Types

        There are few media types when you declare CSS with . print, projection and screen are few of the commonly used types. Understanding and using them in proper ways allow better user accessibility. The following article explains how to deal with CSS Media types.

        More - CSS and Media Types, W3 Media Types, CSS Media Types, CSS2 Media Types

Jan 31, 2009

Edit your photo online with Picnik

edit photo online with picnik

Now, when it comes to online-photo-editing I hope you are not expecting Photoshop facilities like filters, vectorizing, blur tools, etc. Apart from that, Picnik is a cool tool to edit your photos online. Something convenient that let you do the basic things without launching your Photoshop I’d say. More information after jump.


Here’s what Picnik is capable of:

  • One-click photo fixing or in-depth tweaking
  • Crop, rotate, and resize in real-time
  • Tons of special effects, from artsy to fun
  • Works directly with many photo sharing sites (Flickr, Imageshack, Photobucket, etc)
  • No download required, nothing to install!
  • Editing photos online with a browser, Picnik is perhaps the best I’ve seen so far. So if you were to blog somewhere outside without your PC or laptop, make sure you bookmarked Picnik in your del.icio.us

    via lifehacker

    Edit your photo online with Picnik

    edit photo online with picnik

    Now, when it comes to online-photo-editing I hope you are not expecting Photoshop facilities like filters, vectorizing, blur tools, etc. Apart from that, Picnik is a cool tool to edit your photos online. Something convenient that let you do the basic things without launching your Photoshop I’d say. More information after jump.


    Here’s what Picnik is capable of:

  • One-click photo fixing or in-depth tweaking
  • Crop, rotate, and resize in real-time
  • Tons of special effects, from artsy to fun
  • Works directly with many photo sharing sites (Flickr, Imageshack, Photobucket, etc)
  • No download required, nothing to install!
  • Editing photos online with a browser, Picnik is perhaps the best I’ve seen so far. So if you were to blog somewhere outside without your PC or laptop, make sure you bookmarked Picnik in your del.icio.us

    via lifehacker

    Jan 28, 2009

    AuctionAds Tips: Section Targeting

    Section targeting is important, it help making our ads look relevant to the content, thus increase its CTR. Here’s something useful I’ve learned from Earners Blog, you can now section target your AuctionAds; making the ads look very related to your content.

    How to Section Target AuctionAds

    Say you are talking about cell phones, Motorola for instance. Here’s the code to be inserted.

    auctionads_ad_kw = "motorola";

    Here’s how you can dynamically section target your AuctionAds. If your blog entry is posted under the category Cellphones, your AuctionAds can dynamically target the category’s title with this following codes:

    auctionads_ad_kw = "

    { echo $cat->cat_name . ‘ ‘; } ?>";

    Good luck and Happy Making money online.

    AuctionAds Tips: Section Targeting

    Section targeting is important, it help making our ads look relevant to the content, thus increase its CTR. Here’s something useful I’ve learned from Earners Blog, you can now section target your AuctionAds; making the ads look very related to your content.

    How to Section Target AuctionAds

    Say you are talking about cell phones, Motorola for instance. Here’s the code to be inserted.

    auctionads_ad_kw = "motorola";

    Here’s how you can dynamically section target your AuctionAds. If your blog entry is posted under the category Cellphones, your AuctionAds can dynamically target the category’s title with this following codes:

    auctionads_ad_kw = "

    { echo $cat->cat_name . ‘ ‘; } ?>";

    Good luck and Happy Making money online.

    Jan 19, 2009

    18 Forums Web Designers Shouldn’t Missed

    forums for designers

    Whether you hit a design block, encounter technical difficulties in terms of HTML / CSS / Javascripts, in the search for open source scripts or simply just seeking for design feedbacks; you probably should be looking for a site where people of the same interest gathers - forum.

    As a designer-cum-developer I find myself visiting forums quite frequent, not to chat but rather to check out what’s new, what’s in trend or the hottest topics discussed. Participating in forums discussion not only allows you to share your interest and techniques with fellow peers, but as well as mutually gaining in terms of skills and knowledge. Here’s a list of forums I’ve come across or been really active in. Full list after jump.

    You might also want to check out some web design related articles I’ve previously published:

    Forums for Web Designers

    1. Digital Point - HTML Web Design

      One of the biggest webmaster communities online.

      digital point

      Join

    2. Web Design Forum.net

      Get your web design and development questions answered.

      Join

    3. CSS Chat

      CSS & Web design forum.

      css chat

      Join

    4. Designers Talk

      Web design forums for designers to website design.

      designers talk

      Join

    5. Estetica Design Forum

      Graphic design forum and web design forum.

      estetica

      Join

    6. Freelance Gossip

      Webmaster Forum - Web Design and Development - SEO - Freelance.

      freelance gossip

      Join

    7. Graphic Design Forum

      graphic designs

      Join

    8. HTML Forum

      Free webmaster HTML help and discussions.

      html forum

      Join

    9. Kirupa Forum

      Shocked resource for making designers better developers.

      kirupa

      Join

    10. Open Web Design

      open web design

      Join

    11. Site Point

      Resources, Design, HTML, CSS, PHP, ASP, MySQL and more for your web site.

      sitepoint

      Join

    12. Web Designer Forum (UK)

      Web Design CSS Forum free Design Templates for Web Designers and Developers.

      web designer forum

      Join

    13. Web Design Forum

      Web Design Forum , Website Hosting, Web Development Templates Discussion.

      webdevforums

      Join

    14. Webdigity

      Resources, web design, php, internet marketing.

      webdigity

      Join

    15. Webforumz

      Web design and development forum.

      webforumz

      Join

    16. Webmaster Talk

      Web design, coding, SEO.

      webmaster talk

      Join

    17. Wtricks

      Discuss about web design and development, read good tutorials and get free downloads.

      wtricks

      Join

    18. TalkFreelance

      Freelance Webmaster, Web Design & SEO community.

      wtricks

      Join

    18 Forums Web Designers Shouldn’t Missed

    forums for designers

    Whether you hit a design block, encounter technical difficulties in terms of HTML / CSS / Javascripts, in the search for open source scripts or simply just seeking for design feedbacks; you probably should be looking for a site where people of the same interest gathers - forum.

    As a designer-cum-developer I find myself visiting forums quite frequent, not to chat but rather to check out what’s new, what’s in trend or the hottest topics discussed. Participating in forums discussion not only allows you to share your interest and techniques with fellow peers, but as well as mutually gaining in terms of skills and knowledge. Here’s a list of forums I’ve come across or been really active in. Full list after jump.

    You might also want to check out some web design related articles I’ve previously published:

    Forums for Web Designers

    1. Digital Point - HTML Web Design

      One of the biggest webmaster communities online.

      digital point

      Join

    2. Web Design Forum.net

      Get your web design and development questions answered.

      Join

    3. CSS Chat

      CSS & Web design forum.

      css chat

      Join

    4. Designers Talk

      Web design forums for designers to website design.

      designers talk

      Join

    5. Estetica Design Forum

      Graphic design forum and web design forum.

      estetica

      Join

    6. Freelance Gossip

      Webmaster Forum - Web Design and Development - SEO - Freelance.

      freelance gossip

      Join

    7. Graphic Design Forum

      graphic designs

      Join

    8. HTML Forum

      Free webmaster HTML help and discussions.

      html forum

      Join

    9. Kirupa Forum

      Shocked resource for making designers better developers.

      kirupa

      Join

    10. Open Web Design

      open web design

      Join

    11. Site Point

      Resources, Design, HTML, CSS, PHP, ASP, MySQL and more for your web site.

      sitepoint

      Join

    12. Web Designer Forum (UK)

      Web Design CSS Forum free Design Templates for Web Designers and Developers.

      web designer forum

      Join

    13. Web Design Forum

      Web Design Forum , Website Hosting, Web Development Templates Discussion.

      webdevforums

      Join

    14. Webdigity

      Resources, web design, php, internet marketing.

      webdigity

      Join

    15. Webforumz

      Web design and development forum.

      webforumz

      Join

    16. Webmaster Talk

      Web design, coding, SEO.

      webmaster talk

      Join

    17. Wtricks

      Discuss about web design and development, read good tutorials and get free downloads.

      wtricks

      Join

    18. TalkFreelance

      Freelance Webmaster, Web Design & SEO community.

      wtricks

      Join