Posted by Jonathan N. Little on 10/07/38 12:01
Jeff wrote:
> I'd like to specify the width of a link. (This would be for a menu).
>
> You can do this easily in quirks mode but I'm having trouble in
> standards mode.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
> <div style="width: 400px;border: 1px solid black">
> <a href="" style="width: 100%;background-color: green">should go 100%</a>
> </div>
>
> What's the trick? The end desired result is to do this using lists,
> I've shown the div as it simplifies the example.
What you have won't work because A elements are inline elements and do
not have a width property. What you can do is make it display as block
then it would have a width.
<a style="display: block; ...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|