Link to home
Start Free TrialLog in
Avatar of ed987
ed987

asked on

span width:100% in Firefox ?

following works as expected in IE (colors full line), but only colors those dots in Firefox:
<span style="background-color:#eaeaff;width:100%;">.....</span>

how can i fix it for Firefox ?
( it does work if i use div, but i don't like that it breaks line, but if i use display:inline i get same  problem as above )

Avatar of Roonaan
Roonaan
Flag of Netherlands image

Add also display:block;

display:inline elements cannot have a width.

-r-
Avatar of ed987
ed987

ASKER

no, that would break line, which i really don't wan't
What do you mean with break line? How would a 100% wide element not be on a single line?

-r-
This should do the trick:

<span style="background: #ccc; width: 100%; display: block; float: left;">................ </span>

Actually that is exactly what Roonaan said...have you tried this yet?
ASKER CERTIFIED SOLUTION
Avatar of KennyTM
KennyTM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial