Forum Moderators: not2easy

Message Too Old, No Replies

making "display:inline width=100%" work in FireFox

         

musicales

3:12 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



I have an H1 tag which in IE displays a nice background to a heading. In IE the width:100% works and if you put it in a table td it stretches to fill the whole width of the td, even if there is not enough writing between the tag. In Firefox and opera it only puts the background behind the words, not the whole length of the td. I can solve it by removing the display:inline but then I have the h1 line break gap which screws up the rest of the design on the site.
Anyone got any ideas how to have my cake and eat it?

Here's the stylesheet


h1{color:#000000;font-weight:bold;padding:2px 10px 2px 10px;
background:#EEEDED;border-bottom:1px solid rgb(0,0,0);
border-top:1px solid rgb(0,0,0);FONT-family:Trebuchet MS,arial;
display:inline;width:100%}

DrDoc

3:19 pm on Jul 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried just removing the margin?

margin: 0;

And, no display:inline with that... ;)

musicales

3:42 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



I knew there was a reason I loved this site!
Thanks Doctor, worked a treat.