Previous Message
Next Message

Re: [css-d] help with a A style

Sent by Arlen P Walker on 6 December 2002 16:04


>#topnav a
>            {
>            text-decoration:none;
>       font-weight:300;
>            color: #FFFFFF;
>            border : 1pt solid #FFFFFF;
>            text-align : center;
>            width : 100px;
>            }

Which browser and what HTML is involved are an important questions. For
example, in quirks mode IE gives you what you want...in standards mode
(XHTML1.1) it doesn't. The problem is the box is shrinking to the size of
the text you put in it. That isn't going to be useful to you, because even
if you play with the padding, etc., of the box, you're still not going to
make it work properly.

A possible solution would be to add "float:left;" to the above CSS, which
will then stack them up starting from the left side of the container until
they run out of space (assuming you want a horizontal arrangement, implied
by calling it "topnav").

"display:block;" will also do it for you, but that will stack them
vertically, rather than horizontally.

In either case, you'll want to play a bit with margins and padding to try
and get the borders to overlap properly. (Or only give the first one a
complete border, while giving the rest borders on only three sides.)

Have fun,
Arlen
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

[EMAIL-REMOVED]
----------------------------------------------
In God we trust; all others must provide data.
----------------------------------------------
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.


_______________________________________________
css-discuss [EMAIL-REMOVED]]
http://two.pairlist.net/mailman/listinfo/css-discuss
Sponsored by www.westciv.com - CSS resources | software | learning
Previous Message
Next Message

Possibly related: