Grow your CSS skills. Land your dream job.

CSS questions of whether it is possible…?

  • # May 4, 2008 at 1:02 pm

    I have a few questions on whether or not you can do these with CSS:

    1) Can you give the individual list items in a unordered list an ID of some type so you can specify certain charateristics of that item while not affecting the other items.

    example (rough code)
    <ul>
    <li ID="something1">
    <li ID="something2"?
    <ul>

    2) if you have multiple DIVS that you need to line up horizontally (and they are the same dimensions), would you "FLOAT" the DIVs to accomplish this and how to you account for order so that the correct div is closest to the left, followed by the next DIV in order further to the right and the next even further right…ect?

    # May 4, 2008 at 2:00 pm

    1) Yes it can be done – in fact that’s how you get sprites to work.

    2)Yes you use float to get them to line up. If you use float left the first <li> will be the left most item and the last <li> will be the right most item. If you use float right, the <li> items will be reversed.

    box
    # May 4, 2008 at 6:02 pm

    Remember that if you’re using xhtml (as opposed to HTML) you’re attributes (‘id’ etc.) should be lowercase.

    # May 4, 2008 at 6:15 pm

    Thanks ALL!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".