J
Jean-Fran?ois Lacrampe
Hello again,
I'm struggling with another basic problem:
<div class="mainbox-title-content">
<h4>Content !</h4>
</div>
if I use this stylesheet:
..mainbox-title-content {
background-image: url("images/mainbox-tc.png");
background-repeat: repeat-x;
height: 28px;
display: block;
}
The <div> takes a width of 100% by default.
If I replace display: block with display: inline, the <div> adapts to
the width of the text it contains. That is the behaviour I want. BUT
setting it inline makes the browser ignore the height.
What I'd like is that the width adapts automatically according to the
content with a fixed height, in fact, emulating the tables behaviour.
There's a display:table tag, which works well with gecko, but won't
work with IE. I can't rely on it for obvious reasons. :-/
Is there another way to do that or will I have to revert to a good old
table for that?
Thanks,
JFLac
I'm struggling with another basic problem:
<div class="mainbox-title-content">
<h4>Content !</h4>
</div>
if I use this stylesheet:
..mainbox-title-content {
background-image: url("images/mainbox-tc.png");
background-repeat: repeat-x;
height: 28px;
display: block;
}
The <div> takes a width of 100% by default.
If I replace display: block with display: inline, the <div> adapts to
the width of the text it contains. That is the behaviour I want. BUT
setting it inline makes the browser ignore the height.
What I'd like is that the width adapts automatically according to the
content with a fixed height, in fact, emulating the tables behaviour.
There's a display:table tag, which works well with gecko, but won't
work with IE. I can't rely on it for obvious reasons. :-/
Is there another way to do that or will I have to revert to a good old
table for that?
Thanks,
JFLac