Stert
01-29-2006, 04:58 AM
I am having trouble getting a couple of DIVs to stay the right size and width. I am converting a layout from using tables to DIVs, and it's all gone well up until this. With the table layout, the boxes that are giving me trouble as DIVs were automatically sized, depending on how much text they contained. With the DIVs, they're coming out at 100%. I can change the size if I set it to a pixel value, but I'd much prefer it to automatically size.
This is how it used to look:
http://img79.imageshack.us/img79/9504/correctsize4fv.th.png (http://img79.imageshack.us/my.php?image=correctsize4fv.png)
This is what it does now:
http://img79.imageshack.us/img79/8374/wrong0ui.th.png (http://img79.imageshack.us/my.php?image=wrong0ui.png)
This is the code for that section of the page:
<div class=infoboxes>
<a href="#" onClick="expandcontent('sc1')">Who…</a>
<div id=sc1 class=switchcontent>
<blockquote>
<b>Stert</b>
<br>
theanix -at- gmail -dot- com
<br>
<a href="http://www.myspace.com/hostiletakeovercrew" target=new>myspace.com/hostiletakeovercrew</a>
<br>
0411 540 373
</blockquote>
</div>
<p>
<a href="#" onClick="expandcontent('sc2')">What…</a>
<div id=sc2 class=switchcontent>
<blockquote>
<b>Images</b>
<br>
<a href="http://www.drukqs.net/" target=new>r. d. james</a>, <a
href="http://www.director-file.com/cunningham" target=new>c. cunningham</a>; <a
href="http://en.wikipedia.org/wiki/At_the_drive-in" target=new>el paso, tx</a>
</blockquote>
</div>
</div>
And here is the stylesheet:
.switchcontent
{
text-align: center;
width: auto;
}
.infoboxes
{
font-size: 10pt;
font-family: courier;
line-height: 12pt;
color: #ffffff;
text-align: center;
}
blockquote
{
font-size: 10pt;
font-family: courier;
line-height: 12pt;
color: #ffffff;
border: dashed;
border-width: 1px;
text-align: left;
}
This is how it used to look:
http://img79.imageshack.us/img79/9504/correctsize4fv.th.png (http://img79.imageshack.us/my.php?image=correctsize4fv.png)
This is what it does now:
http://img79.imageshack.us/img79/8374/wrong0ui.th.png (http://img79.imageshack.us/my.php?image=wrong0ui.png)
This is the code for that section of the page:
<div class=infoboxes>
<a href="#" onClick="expandcontent('sc1')">Who…</a>
<div id=sc1 class=switchcontent>
<blockquote>
<b>Stert</b>
<br>
theanix -at- gmail -dot- com
<br>
<a href="http://www.myspace.com/hostiletakeovercrew" target=new>myspace.com/hostiletakeovercrew</a>
<br>
0411 540 373
</blockquote>
</div>
<p>
<a href="#" onClick="expandcontent('sc2')">What…</a>
<div id=sc2 class=switchcontent>
<blockquote>
<b>Images</b>
<br>
<a href="http://www.drukqs.net/" target=new>r. d. james</a>, <a
href="http://www.director-file.com/cunningham" target=new>c. cunningham</a>; <a
href="http://en.wikipedia.org/wiki/At_the_drive-in" target=new>el paso, tx</a>
</blockquote>
</div>
</div>
And here is the stylesheet:
.switchcontent
{
text-align: center;
width: auto;
}
.infoboxes
{
font-size: 10pt;
font-family: courier;
line-height: 12pt;
color: #ffffff;
text-align: center;
}
blockquote
{
font-size: 10pt;
font-family: courier;
line-height: 12pt;
color: #ffffff;
border: dashed;
border-width: 1px;
text-align: left;
}