On Tue, 6 Mar 2007, Ross Hulford wrote:
> I have a top leve' menu Item that are buttons.
>From your sample code, I gather that they are links that have been
formatted in CSS to look like buttons. (As usual, a URL would have
helped.)
> I need to turn the text off but display:none hide the button too.
>
> <li class="topmenuli"><a href="../home/index.php" class="home">Home </a> </li>
I guess you are trying to prevent a link pointing to the page itself from
looking like a link.
This is really something that you should not be doing in CSS. Instead, you
should remove the <a> markup and check that the appearance remains good,
or perhaps just remove the href attribute. That is, the link itself should
be turned into a non-link. This may require some revision of the site
construction and maintenance, but it's really the only _solution_.
Otherwise, the link may keep looking like a link in non-CSS browsing
situations and participate in tabbing order, be clickable, etc., resulting
perhaps in more confusion that a simple link pointing to the page itself.
> Is it good practice to turn of the text like this
>
> #dmenu .home {
> font-size:0px;
> }
No. In addition to the general idea that the link shouldn't be there
in the first place, the technique would fail in many occasions, including
a setting for a minimum font size in a browser.
Technically, setting visibility: hidden would remove the text and leave a
"hole", but it seems that you would like an empty button-like box to
appear. Using extra markup inside the <a> element and setting visibility:
hidden for the inner element would have the desired effect - but you could
more easily achieve this by making the content of <a> empty.
--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/