CSS and hover buttons (graphics) (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


lilblackgirl -> CSS and hover buttons (graphics) (1/22/2007 13:50:28)

knowing that managing links via CSS is so simple, is it possible to do the same for navigation that is built with graphics? Theoretically, i've got a site that a client wants to use a certain font on their nav bar, so i have to build it using graphics. Is it possible to manage that nav bar with hover options with CSS instead of javascript? You would have to assign each button to a new <div id="">, but would that work? and wouldn't it still be a smaller file size than using the graphics on the page and the javascript?

i hope i'm making sense.




jaybee -> RE: CSS and hover buttons (graphics) (1/22/2007 13:57:51)

Build your nav using a list.

Use 2 images for each button, up and down.

Assign one image to the link and the other to hover.

http://css.maxdesign.com.au/listamatic/vertical11.htm

You'll need to adapt that to use different images for each button though as that one uses the same two and puts the text on as text.




lilblackgirl -> RE: CSS and hover buttons (graphics) (1/22/2007 15:38:11)

So, in your opinion, would using CSS be better? Or just more difficult b/c you'd have to have individual CSS info for each button, up and down?

and thanks for the info and link. [:)]




jaybee -> RE: CSS and hover buttons (graphics) (1/22/2007 17:28:18)

I'd always use css unless there was a very good reason not to. At the moment I can't think of any.




Tailslide -> RE: CSS and hover buttons (graphics) (1/23/2007 2:38:37)

Yes CSS is definitely better. You don't need different buttons if you're using the web page text as the button text either (which is the more accessible way of doing it).

If you want the button text to be part of the image then there's this method that I found the other day that's reasonably accessible: http://www.thevisualprocess.com/dev/rollover/index.php You do need to position the button for each menu item but it's not horrendous.




lilblackgirl -> RE: CSS and hover buttons (graphics) (1/23/2007 15:40:31)

The only reason I'd be using the js is because the font they choses was not a common one, so the text wouldn't be an option in this case. And i'll give a run to the rollover CSS, Tailslide, thanks, but i'm not sure how much easier that would be. You can see the navigation i have to deal with - http://www.narrowtrail.org/.

There's probably a tradeoff between code size and difficulty in writing it.




Tailslide -> RE: CSS and hover buttons (graphics) (1/23/2007 16:44:06)

Shouldn't be too bad - make 'em all the same width to make your life easier.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.201172E-02