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.

CSS Forum


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



Reply
navigation and changing background position.
Old 11-25-2009, 06:41 AM navigation and changing background position.
numbenator's Avatar
Webmaster Talker

Posts: 516
Location: London
Trades: 0
HI

I have to design a horizontal navigation as ::

http://quintain-wembleycity.catchdig...mbley-tabs.jpg

I know that i must change the background position of the purple and i have created an image that shows all the different states so on mouse over i can put the purple in place.

However, as i began to develop i realised that the change in state extends past the actual a href parameters i defined.

How do i style this type of navigation up please. Any help would really be appreciated.

I started with the below as an start point::

Code:
<style type="text/css">
<!--

#nav-container {
		width:908px;
		min-height:50px;
		background-image:url(images/navigation/tabs.jpg);
		background-position:top left;
		background-repeat:no-repeat;
}


a.home {
display:block;
width: 110px;
font: bold 13px sans-serif;
/*padding:2px 0 0 10px;*/
color:#333;
background: url(images/navigation/hovers.jpg) 0 50px no-repeat;
text-decoration: none;
min-height:47px;
}
* html a.home  {
		width:110px;
		height:47px;
}
a.home:hover { 
background-position: 0 0px;
color: #FFF;
}

/*
.home a:active {
background-position: 0 -70px;
color:#fff;
}*/
-->
</style>


<body>
	<div id="nav-container">
    <a href="" class="home">&nbsp;</a>
        </div>

</body>
thanks
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
Register now for full access!
Old 11-25-2009, 07:50 PM Re: navigation and changing background position.
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
This is a good candidate for using sprites instead.
Why?
1. You can make the entire menu bar look as you want for each roll-over state.
2. There is no need to pre-load any images used for roll-over.
3. There is ONE http request for the entire menu rather than at least 9 in your case.

Take a look at these tutorials:
Smashing Magazine
Nettuts
stylemeltdown
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 11-26-2009, 09:35 AM Re: navigation and changing background position.
numbenator's Avatar
Webmaster Talker

Posts: 516
Location: London
Trades: 0
Hey racer. Thanks for your response.

Could you elaborate on sprites? Im unaware of what it is etc etc.

thanks
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 11-26-2009, 09:49 AM Re: navigation and changing background position.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
CSS Sprites
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-26-2009, 10:25 AM Re: navigation and changing background position.
numbenator's Avatar
Webmaster Talker

Posts: 516
Location: London
Trades: 0
great thanks very much for you input.
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Reply     « Reply to navigation and changing background position.
 

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.15097 seconds with 12 queries