[Solved]CSS issues...
Posted: Thu Jul 05, 2012 4:19 am
Alright, I've been fighting with this little problem for the past few hours, and finally am going to ask for a little advice.
My goal is to have a <div> and inside that div, contain 3 more divs (left, center, right) Using 30%,40%,30% respectively.
The issue, the right div keeps getting put onto another line.
The CSS I will post has been heavily modified to try and get it working, so it may look messy, but didn't start out that way.
The HTML:
And the CSS:
I've tried everything from inline-block, clear:both, etc... and none of it has worked. But I may have been putting it in the wrong place.
So, anyone have any suggestions/advice on how I could get this to work?
Thanks.
My goal is to have a <div> and inside that div, contain 3 more divs (left, center, right) Using 30%,40%,30% respectively.
The issue, the right div keeps getting put onto another line.
The CSS I will post has been heavily modified to try and get it working, so it may look messy, but didn't start out that way.
The HTML:
Code: Select all
<div id='maingame'>
<div id='infobox'>
<div class='charbox'>char</div>
<div class='displaybox'>display</div>
<div class='actionbox'>action</div>
</div>
<br /><br />
<div id='chatbox'>CHAT</div>
</div>
Code: Select all
#infobox
{
width: 100%;
height: 50%;
display: inline-block;
}
.charbox
{
float: left;
width: 29%;
height: 100%;
background-color: #555555;
}
.actionbox
{
float: right;
width: 29%;
height: 100%;
background-color: #555555;
}
.displaybox
{
width: 40%;
height: 100%;
margin: auto;
background-color: #555555;
}
So, anyone have any suggestions/advice on how I could get this to work?
Thanks.