SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    whagwan? silver trophybronze trophy akritic's Avatar
    Join Date
    Nov 2006
    Posts
    2,780
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    positioning- best practices

    This may seem a very simple question, but coming from from an absolute beginner i'm just looking for a definitive answer....or opinions.

    I want to know which of Class and Id selectors is the best for positioning
    elements on a page?

    Id, generally in my limited scope means Div's. Class, means something you create. But that Id selectors can only refer to one element, whereas class selectors can refer to as many as you desire? Have I got this right?

    What I'm looking to do, is to play around with the CSS i've learned so far and
    get a feel for the various bits that make up positioning part of CSS. I've been playing with Div's so far, looking to place them in counterpart and offseting them, just really looking to make a well sectioned page. I've used borders around elements to see how it fits on the page but cannot really get at what i'm aiming for.

    Sorry for the garbled rant in the last paragraph, but I think I'm a bit stuck and would apreciate any thoughts.

    Andy

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You're almost right, except that the id and class attributes can be used on any element, not just div.
    Saul


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
  •