FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » CSS question

   
Author Topic: CSS question
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
I'm working on a navigation menu for a website. I'm trying to do the whole site in CSS, and I'm still pretty new to all this. I'd like the text for the navigation links to have a drop shadow effect.

I know there is text-shadow property, but apparently it's not supported by most browsers.

Is there another method of doing this without having to make the text into images?

Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
BaoQingTian
Member
Member # 8775

 - posted      Profile for BaoQingTian   Email BaoQingTian         Edit/Delete Post 
CSS are pretty cool. To answer your question, I don't know of any cross-browser text shadow effect that can be done without images.

My experience with webdesign:

1) You can make a sharp, professional looking site that will look the same on most browsers, but won't have a lot of fancy features.
2) You can invest a lot more time in doing browser specific sites (e.g. writing code that only executes if a particular browser is viewing it) and integrate quite a bit more options.
3) You can make a really good site that has fantastic features, but only for one browser. Anything else will be buggy.

IMO until all the browsers actually become fully w3c compliant, the situation won't change much. I'd end up going with #1 unless you're doing a corporate site where people are required to use a certain browser.

Posts: 1412 | Registered: Oct 2005  |  IP: Logged | Report this post to a Moderator
HollowEarth
Member
Member # 2586

 - posted      Profile for HollowEarth   Email HollowEarth         Edit/Delete Post 
Does this work? His examples seem to work okay on Firefox at least.
Posts: 1621 | Registered: Oct 2001  |  IP: Logged | Report this post to a Moderator
MightyCow
Member
Member # 9253

 - posted      Profile for MightyCow           Edit/Delete Post 
I would ask yourself how much drop shadows are really going to add to the site, compared to how much effort it will be to make them look good and work consistently.

I'm not a CSS expert, although I have professionally designed websites for 10 years. I would suggest that if you really want good looking drop shadow, and you want to make sure it works, make some JPGs and use those as buttons.

Posts: 3950 | Registered: Mar 2006  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
I'll check out that link HollowEarth and see if it helps. I looked briefly and it does seem a bit too complicated to be worth it, and it still won't look great in every browser. But i'll take a closer look.

MightyCow, the drop shadows may or may not be that important, i'm mostly just trying out a lot of different things to learn as much as possible. The reason i'm trying to do this all in CSS is that normally if i need to make any minor changes to the navigation bar/buttons it's all a huge hassle, because i have to change each image individually, plus i'm using rollovers. So just minor size changes are a real pain.

now sure, if i get rid of the drop shadow that's all made easier because i can use css and make changes across the board with one simple property change.

I know it's just a minor effect, but I do like the way it looks right now.

Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Chris Bridges
Member
Member # 1138

 - posted      Profile for Chris Bridges   Email Chris Bridges         Edit/Delete Post 
I've tried different methods to apply drop shadows with CSS and haven't found any that were both easy and cross-browser compliant (you can have one or the other).

Instead, I would suggest you make a graphic of a button with a drop shadow and then use that as a background-graphic element for the navigation button. You'll still be able to change it easily and site-wide.

Posts: 7790 | Registered: Aug 2000  |  IP: Logged | Report this post to a Moderator
Mike
Member
Member # 55

 - posted      Profile for Mike   Email Mike         Edit/Delete Post 
If you go with images (which I'd recommend in this particular case), you might want to think about using ImageMagick or something similar to generate the images for you. That way if you need to change the text or colors you can just rerun your script. (This does require a bit of knowledge to get going, though.)
Posts: 1810 | Registered: Jan 1999  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
To do it in the most CSS way, create a structure as follows:

code:
<a><span>Text on Button</span></a>

Make the span invisible in your CSS. Make the a tag a block tag and arrange the dimensions to be the size of your image, then make the image its background image. Have an a:hover style that switches out the background image for the image to show the link is being hovered over.

The structure should be in a list, since we're talking about a menu.

This way browsers without CSS support just see the nice list of links with plain text. That's important for two reasons: search engine ranking (spiders are just little browsers, and they like links with text far better than image links) and accessibility (screen readers will have no problem at all since the text is in there).

Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
okay, so just to make sure i'm on the right page here, your suggestion won't help with my drop shadow situation, but is specifically for SEO right?
Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
citadel
Member
Member # 8367

 - posted      Profile for citadel   Email citadel         Edit/Delete Post 
How about we all just use FireFox? [Smile]
Posts: 89 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
It helps with the drop shadow situation by making it possible to use images to get the drop shadow effect without losing most of the benefits of CSS or text menus.
Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2