- #1
davee123
- 672
- 4
So, I always used to use TABLE tags. And nowadays, everyone says "don't use TABLEs-- use DIVs instead!" But, for the love of all that is sacred, I can't figure out how to place DIVs next to each other.
I can figure out how to make a DIV float to the extreme left or extreme right, but what if I don't want to do that? I just want (for example) 4 divs in a row in the middle of whatever container I put them in.
Effectively, I'm making "tabbed" navigation. I'm hoping to make each "tab" in the navigation be a separate DIV tag, and have them all line up. And of course in the CSS, I'll probably have different named-styles, like "selected", "unselected", "highlighted", so that they'll appear different when the mouse is over them or when they're currently on the desired page.
Anyway, the problem I have is that each time I try to put 2 DIVs next to each other, the 2nd DIV always goes below the first one! Is there some hidden "display" setting I should set it to? Is there another high-level CSS property that's defaulted to do this?
I found one other example that does what I want, but they use LI (list element) tags rather than DIVs. Was that because DIVs don't do what's required? Or did this person similarly just throw in the towel?
DaveE
I can figure out how to make a DIV float to the extreme left or extreme right, but what if I don't want to do that? I just want (for example) 4 divs in a row in the middle of whatever container I put them in.
Effectively, I'm making "tabbed" navigation. I'm hoping to make each "tab" in the navigation be a separate DIV tag, and have them all line up. And of course in the CSS, I'll probably have different named-styles, like "selected", "unselected", "highlighted", so that they'll appear different when the mouse is over them or when they're currently on the desired page.
Anyway, the problem I have is that each time I try to put 2 DIVs next to each other, the 2nd DIV always goes below the first one! Is there some hidden "display" setting I should set it to? Is there another high-level CSS property that's defaulted to do this?
I found one other example that does what I want, but they use LI (list element) tags rather than DIVs. Was that because DIVs don't do what's required? Or did this person similarly just throw in the towel?
DaveE