PDA

View Full Version : Simple action


chad
5th July 06, 09:16 AM
Hello,
this is my first message (actually question) in this forum. I have such a problem:

I write:

<td width="476" align="left" valign="top"><div class="galvared">One&nbsp;&nbsp;|&nbsp;&nbsp;</div><div class="galvaorange">Two&nbsp;&nbsp;|&nbsp;&nbsp;Three</div></td>

and I dont know why when I look at browser it shows "One" in one line and "Two" and "Three" in other line while I need all three to be in one line. As I fugured out that if there are two div's one after other so the first pushes the second to other line. Maybe you know how to make it one line with different divs?

Thank you very much

funkyprem
5th July 06, 09:43 AM
div's by default arre block elements meaning they will automatically flow underneath each other even if they have space to fit on the same line.

Two ways to get what you want:

Easy way: change the divs to spans (spans are inherently inline elments)
Hard way: add div.galvared {display: inline;} to your css

:)

chad
5th July 06, 09:59 AM
Yes, it works. Thank you. By the way, the Hard way isn't so hard:)

funkyprem
5th July 06, 10:11 AM
it's all relative!

hard as in harder than the easy way. ;)

WebMistress
5th July 06, 01:56 PM
Even better way - DUMP THE TABLES !!!