Forum Moderators: not2easy

Message Too Old, No Replies

Questions: Can you do these items with CSS?

         

pghtech

5:06 pm on May 4, 2008 (gmt 0)

10+ Year Member



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>

OR

<ul>
<li class="something">
<li class="somethingelse">
<ul>

/style
.something {
blah blah
blah blah
}

2) if you have multiple DIVS that you need to line up horizontally across the page(and they are the same dimensions), would you "FLOAT" the DIVs to accomplish this and how do you account for order so that the correct div are in order left to right?

surrealillusions

9:44 pm on May 4, 2008 (gmt 0)

10+ Year Member



1 - yes, i cant see why not.

2 - horizontally across the page? dont you mean vertically across the page?

If you mean in rows, then you just need to write them in the order they appear in the page.

If you mean in coloumns..it gets complicated. 2 is easy, float one to the left, and one to the right. 3 coloumned layout is tricky, but theres loads of examples out there. 4 or more is probably unheard of, or at least very rare and probably very difficult to achieve across all browsers.

hope that helps.

:)