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
Old 06-29-2006, 05:49 AM CSS Button Help
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
I need some help with a css button design.

I want to make the following graphic into a css style and will be used as a div.

Mouse Out


Mouse Over


Only one will need to be created as its going to be an administrable navigation bar.

To view how it will be used click here:
http://www.imagered.co.uk/demo/scruples

This is only a test page.

Any help would be great
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
 
Register now for full access!
Old 06-29-2006, 08:09 AM Re: CSS Button Help
King Spam Talker

Posts: 1,186
Location: Manchester, UK
Trades: 0
You can use css to display a different background image for your hovered link :
HTML Code:
a:link, a:visited {
  color: #fff;
  background: url(white.gif) top left no-repeat;
}

a:hover {
  color: #ccc;
    background: url(gray.gif) top left no-repeat;  
}
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 06-30-2006, 12:38 AM Re: CSS Button Help
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
But why use an image when you can just create it all in just plain CSS?

HTML Code:
<style>
body {
	background-color: black
}

a.btn {
	padding: .25em .25em;
	border: 4px double white;
	font-family: Arial;
	font-size: 8pt;
	text-transform: uppercase;
	color: white;
	text-decoration: none;
	display: block;
	clear: both;
	float: left;
	width: 120px;
	text-align: center
	
}

a.btn:hover {
	color: #ddd;
	border-color: #ddd
}
</style>

<body>
<a href="#" class="btn">Home</a><br>
<a href="#" class="btn">About Us</a><br>
<a href="#" class="btn">Hugo Boss</a><br>
<a href="#" class="btn">Armani</a><br>
<a href="#" class="btn">Locations</a>
</body>

Last edited by funkdaddu; 06-30-2006 at 12:45 AM..
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 06-30-2006, 12:04 PM Re: CSS Button Help
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Good one !
Even better than all those class="btn" would be to put the nav in a UL and style the links inside it in the CSS .
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-03-2006, 12:29 PM Re: CSS Button Help
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
Quote:
Originally Posted by funkdaddu
But why use an image when you can just create it all in just plain CSS?

HTML Code:
<style>
body {
	background-color: black
}

a.btn {
	padding: .25em .25em;
	border: 4px double white;
	font-family: Arial;
	font-size: 8pt;
	text-transform: uppercase;
	color: white;
	text-decoration: none;
	display: block;
	clear: both;
	float: left;
	width: 120px;
	text-align: center
	
}

a.btn:hover {
	color: #ddd;
	border-color: #ddd
}
</style>

<body>
<a href="#" class="btn">Home</a><br>
<a href="#" class="btn">About Us</a><br>
<a href="#" class="btn">Hugo Boss</a><br>
<a href="#" class="btn">Armani</a><br>
<a href="#" class="btn">Locations</a>
</body>
Cheers mate!!!!

Thats exactly what I wanted
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
Reply     « Reply to CSS Button Help
 

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