SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2 col css layout?

    Hello,
    Can someone give me the code for a 2 column CSS layout?
    Something that doesn't need browser hacks, but is crosbrouwser compatible.
    Also one where there is a margin between the 2 columns, and an other where there isn't one?

    Thanks alot!

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two column layouts are fairly straightfoward but you need to provide more information: fixed or fluid width? Content or sidebar first? Adding a margin between the two columns is as simple as adding margins in your CSS.
    A good place to start would be: http://css-discuss.incutio.com/?page=TwoColumnLayouts

  3. #3
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed width layout.
    I mean, I've coded cs layouts alot before.
    I just wonder what is the best seo-friendly code to use.
    I thought it didn't matter what first, content or sidebar, i just change widths.

    Thanks!

  4. #4
    SitePoint Addict savagepriest's Avatar
    Join Date
    Mar 2006
    Location
    India
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks this is helpful

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sanzo View Post
    I just wonder what is the best seo-friendly code to use.
    The best code to use from an SEO point of view is the same one to use from a usability and accessibility point of view - semantic code that uses the correct tags to describe your content with headings presented in correct order. So it doesn't really matter how you construct the larger building blocks of your layout because divs don't have any semantic meaning (as long as you don't go crazy with too many unnecessary divs), it's how you mark up the content inside those areas that is important.


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
  •