Hi,
This is my first post here.
I am having a puzzling problem with creating <div> boxes inline using CSS.
What I am wanting to do is have 3 boxes on the top row, with one spanning the full length below (as in colspan=3 in talbes)
I can do this as long as the width of the three boxes on the top row do not add up to 100%. As soon as this happens, the third box drops to the second row.
This is the code I am using :
<div style="{border:1px solid; width:50%; padding:0px; margin:0px;}">
<div style="{border:0px; background:#eee; width:50%; display: inline;}">title</div>
<div style="{border:0px; background:#ccc; width:25%; display: inline;}">show/hide</div>
<div style="{border:0px; background:#eee; width:24.5%; display: inline;}">date</div>
<div style="{border:0px; background:#eee; width:100%%; display: block;}">content</div>
</div>
Anything below 100% (even 99.5% as in the above code) works fine. Unfortunately there is a small amount of white-space at the right of the containing block if it is less than 100%.
Has anyone else come across this problem? I hope I am making myself clear.
This is my first post here.
I am having a puzzling problem with creating <div> boxes inline using CSS.
What I am wanting to do is have 3 boxes on the top row, with one spanning the full length below (as in colspan=3 in talbes)
I can do this as long as the width of the three boxes on the top row do not add up to 100%. As soon as this happens, the third box drops to the second row.
This is the code I am using :
<div style="{border:1px solid; width:50%; padding:0px; margin:0px;}">
<div style="{border:0px; background:#eee; width:50%; display: inline;}">title</div>
<div style="{border:0px; background:#ccc; width:25%; display: inline;}">show/hide</div>
<div style="{border:0px; background:#eee; width:24.5%; display: inline;}">date</div>
<div style="{border:0px; background:#eee; width:100%%; display: block;}">content</div>
</div>
Anything below 100% (even 99.5% as in the above code) works fine. Unfortunately there is a small amount of white-space at the right of the containing block if it is less than 100%.
Has anyone else come across this problem? I hope I am making myself clear.