SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot ComposerRyan's Avatar
    Join Date
    Oct 2003
    Location
    USA
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm learning CSS...what's the benefit of it?

    I've been told that I need to switch to CSS and to get rid of the "presentational" clutter on my website. I am familiar with CSS but have never done a whole site based off of it.

    What are the general rules and guidelines I should follow?

    Should I still use <table> tags to format and shape my site?

    What is the <div> tag...is that replacing the <table> tag?

    And finally, where can I go to learn more about CSS?

    Thanks for your help!

    Ryan

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hello,

    What are the general rules and guidelines I should follow?
    Think semantics - Write the HTML that describes the content accurately.
    If it's a heading a list use those html elements to mark it up.

    Should I still use <table> tags to format and shape my site?
    No.

    What is the <div> tag...is that replacing the <table> tag?
    No, the table tag is meant to mark up tabular data - rows and columns.
    The div tag is just a container element with no real semantic meaning.
    You use them to group the various sections of your website and to achieve the formatting you are wanting.

    And finally, where can I go to learn more about CSS?
    The CSS FAQ here at Sitepoint is excellent.
    http://www.sitepoint.com/forums/showthread.php?t=171943

    The best book I have read on it is Dan Cederholm's Bulletproof Web Design - I highly recommend you get yourself a copy.

    Hope it helps

    If you have no idea where to start - post a screenshot of a site you want to create and we'll be able to walk you though creating the minimal HTML and CSS you will need.

  3. #3
    SitePoint Addict
    Join Date
    Sep 2001
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i highly recommend "designing without tables using css", which is a sitepoint book.

    only use tables for tablature data from now on. use css for all your layout.
    Steve Davis

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,817
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Start thinking multiple stylesheets.

    One for the computer screen
    one for the printer
    one for handheld devices
    one for web readers
    one for overhead projectors
    one for braille devices
    etc.

    The same content in the HTML file will be used with separate stylesheets defined for each of those media to produce a page in an appropriate format for the particular media being used. Anthing to do with that appearance does not belong in the HTML as it will interfere with the page when accessed by other media.

    Even if you only add one stylesheet to start with you will probably want to add stylesheets for at least some other media at a future date and any presentational info in the HTML will then be in the way of your doing so and so should not be put there in the first place.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •