Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 12-18-2005, 06:08 AM Nav Bar - CSS or JS?
Experienced Talker

Posts: 31
Trades: 0
Hey guys,

I have a navigation bar to code (see attached).

There are 2 methods I am thinking of using

To use HTML/CSS with inline elements to create this with rollovers, or to use images with Javascript to create the rollovers

I think that the HTML/CSS way will load faster, however I cannot get the navigation bar looking the same as the attached image. If I was doing it this way would I use a background image and then code the inline elements over this image?

Which way is better?
Attached Images
File Type: jpg index_02.jpg (5.9 KB, 24 views)
jwalker80 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-18-2005, 08:30 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
CSS will be far easier, cleaner and more accessable in this case.

You only need 1 image - the gradient that runs along the entire background of the bar. Just make a 1 pixel wide image, and set it to be the background image of a DIV. Repeat it with background-repeat.

Code:
<div id="Navigate">
    <a href="services.htm"> Services</a> | <a href="ourapproach.htm">Our Approach</a> | .....
</div>
Code:
div#Navigate
{
    background-image: url( images/navbg.gif );
    background-repeat: repeat-x;
    // Anything else here... margin, padding, etc
}
 
div#Navigate a:link
{
   // Set the style for the link here
    font-weight: bold;
    font-family: Ariel, Helvetica, sans-serif;
}
 
div#Navigate a:hover
{
    // and set the colour it should change to here
    color: white;
}
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 12-18-2005, 09:26 AM
Experienced Talker

Posts: 31
Trades: 0
Thanks Minaki, great help
jwalker80 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Nav Bar - CSS or JS?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11443 seconds with 13 queries