I've got an absolutely positioned div I'm working with, and I put some text inside of it just to be able to find it on the page, namely:
<div style="position:absolute; top:10px; left:500px; font-size:30px; ">Example Text </div>
The text ends up wrapping, i.e. "Example" and "Text" are on a different line. There are no scroll bars showing in my Firefox browser, in fact it's width is about 1000px. Does one have to set a width on divs? Don't they expand to hold their content?
In case it helps, I included the Firebug CSS output for this element here:
element.style {
font-size: 30px;
left: 500px;
position: absolute;
top: 10px;
}
html * {
margin: 0;
} // main.css (line 1)
Inherited from body:
body {
color: #333333;
font: 11px verdana,arial,helvetica,sans-serif;
}
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…