100% wide links

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">
should go 100%
</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.

I think this wraps up my days worth of questions!

Thanks,
Jeff
jeff [ So, 27 Januar 2008 00:20 ] [ ID #1917075 ]

Re: 100% wide links

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">
> should go 100%
> </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
lws4art [ So, 27 Januar 2008 01:03 ] [ ID #1917671 ]

Re: 100% wide links

In article <13png19c1boa1df [at] corp.supernews.com>,
Jeff <jeff [at] spam_me_not.com> 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">
> should go 100%
> </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.
>

Add display: block; to the style for the anchor.

--
dorayme
dorayme [ So, 27 Januar 2008 01:24 ] [ ID #1917674 ]

Re: 100% wide links

Jonathan N. Little wrote:
> 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">
>> should go 100%
>> </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; ...

Thanks to you and dorayme. About an hour after I wrote this, as I was
driving down the road, that ocured to me.

Jeff
>
jeff [ So, 27 Januar 2008 04:19 ] [ ID #1917686 ]

Re: 100% wide links

Jeff wrote:
> I'd like to specify the width of a link. (This would be for a menu).
>
> <div style="width: 400px;border: 1px solid black">
> should go 100%
> </div>

For navigation menus div is out, lists are in.
http://css.maxdesign.com.au/listamatic/

--
Berg
Bergamot [ Mo, 28 Januar 2008 19:46 ] [ ID #1918629 ]
Miscellaneous » alt.html » 100% wide links

Vorheriges Thema: CSS - Problem with a href. When active I want the links to keep the
Nächstes Thema: Tables with DIV