I was wondering if anyone would know how to make a div box spread to the size of the text in IE and FF.
Click Here (<!-- m --><a class="postlink" href="http://www.gslc.qld.edu.au/Newpage/GSLC(CSSMenu">http://www.gslc.qld.edu.au/Newpage/GSLC(CSSMenu</a><!-- m -->)/index.htm) for my site.
I want the menu system boxs to be the same size as the text that they contain.
Thanks for any help.
Wofenhallo
try this div tag, may be it help you.
<div style="background:#ccffcc;width:1px;">1234545</div>
Best regards
Deep DhyaniThe only problem with that Div is that if you have a space in the line, it places the text onto 2 lines. I want the div to be the total size of the text, but everything has to be on one line, as it is a menu system.
Wofen<div style="background:#ccffcc;float:left;width:auto;">1234545</div>I cant believe it was auto.... I feel dump now. Very dumb, like dumber then homer.
Oh well, we all get that.
<div style="background:#ccffcc;float:left;width:auto;">123 4545</div>
= 123
4545
ok, now I remember why auto did not work, it works well In FF, but in IE it moves things to 2 lines.
WofenIt's not width:auto alone that did it. The float:left is part of it.
Click Here (<!-- m --><a class="postlink" href="http://www.gslc.qld.edu.au/Newpage/GSLC(CSSMenu">http://www.gslc.qld.edu.au/Newpage/GSLC(CSSMenu</a><!-- m -->)/index.htm) for my site.
I want the menu system boxs to be the same size as the text that they contain.
Thanks for any help.
Wofenhallo
try this div tag, may be it help you.
<div style="background:#ccffcc;width:1px;">1234545</div>
Best regards
Deep DhyaniThe only problem with that Div is that if you have a space in the line, it places the text onto 2 lines. I want the div to be the total size of the text, but everything has to be on one line, as it is a menu system.
Wofen<div style="background:#ccffcc;float:left;width:auto;">1234545</div>I cant believe it was auto.... I feel dump now. Very dumb, like dumber then homer.
Oh well, we all get that.
<div style="background:#ccffcc;float:left;width:auto;">123 4545</div>
= 123
4545
ok, now I remember why auto did not work, it works well In FF, but in IE it moves things to 2 lines.
WofenIt's not width:auto alone that did it. The float:left is part of it.