jhedges
02-12-2003, 06:57 PM
I've been scouring the web and this site, but haven't found an answer that works for me. I have a fighter bio page with two divs at the top side-by-side. One holds bio information and the other holds a photo. Below that, I have a div with a the guy's fight history that is pulled from the database.
The spacing is off when there isn't a photo though. I would like the bottom div to sit directly below the two top divs. However, everything I've tried besides absolute positioning puts the fight history directly behind the bio information. See the image at the bottom of this post to understand what it looks like. I added borders to the divs just to illustrate the spacing. They will be removed once the problem is solved.
Is it possible to do what I want here?
I'm pretty new to CSS positioning and I've learned a lot from the examples and tutorial links posted here. But, I just can't figure this one out.
Here is the code I am using for the div's. Any input would be greatly appreciated.
#leftcontent
{
position: absolute;
left:10px;
top:8px;
width:220px;
padding:2px;
background:#fff;
border:1px solid #000;
font-size:8pt;
font-family:arial;
}
#rightcontent
{
position: absolute;
left:230px;
top:10px;
width:300px;
background:#fff;
border:1px solid #000;
font-size:8pt;
font-family:arial;
}
#recordcontent
{
position: absolute;
left:10px;
top:200px;
width:90%;
background:#fff;
border:1px solid #000;
font-size:8pt;
font-family:arial;
}
http://www.ufighting.com/images/news/test.jpg
The spacing is off when there isn't a photo though. I would like the bottom div to sit directly below the two top divs. However, everything I've tried besides absolute positioning puts the fight history directly behind the bio information. See the image at the bottom of this post to understand what it looks like. I added borders to the divs just to illustrate the spacing. They will be removed once the problem is solved.
Is it possible to do what I want here?
I'm pretty new to CSS positioning and I've learned a lot from the examples and tutorial links posted here. But, I just can't figure this one out.
Here is the code I am using for the div's. Any input would be greatly appreciated.
#leftcontent
{
position: absolute;
left:10px;
top:8px;
width:220px;
padding:2px;
background:#fff;
border:1px solid #000;
font-size:8pt;
font-family:arial;
}
#rightcontent
{
position: absolute;
left:230px;
top:10px;
width:300px;
background:#fff;
border:1px solid #000;
font-size:8pt;
font-family:arial;
}
#recordcontent
{
position: absolute;
left:10px;
top:200px;
width:90%;
background:#fff;
border:1px solid #000;
font-size:8pt;
font-family:arial;
}
http://www.ufighting.com/images/news/test.jpg