View Full Version : DiV


Penguin_Otaku
10-17-2004, 08:19 PM
Trying to make a DIV "box", that just goes as far as the text inside it does, but I don't know what to put on Width, I put 100%, which resulted in it going across the page.

kittycat
10-17-2004, 08:28 PM
Don't put any width
or
Make it a smaller percentage/number pixels so that it ends up the width you want

Penguin_Otaku
10-17-2004, 08:34 PM
Didn't work.

EDIT: I kinda want it to just conform to the text because I'm not sure if I'm done tweaking it.

kitty_katt07
10-17-2004, 10:02 PM
<div style="position:absolute; left:0; top:0; width:300; height:300;overflow:auto">
text text
</div>

Did you try that? =\

pb&j
10-17-2004, 10:59 PM
try using a SPAN instead of DIV.

<span> text here </span>

and apply whatever css stuff to that as you desire (without any width)

Penguin_Otaku
10-17-2004, 11:31 PM
So in CSS it'd be.. "Span.Area" and then, "Span id="Area""?

kittycat
10-17-2004, 11:37 PM
Almost... it'd be span class="area".... the . in front means class, a # means id.

Penguin_Otaku
10-17-2004, 11:47 PM
Thank you.