|
#1
| ||||
| ||||
|
For some reason, I am unable to find a thorough and clean tutorial on how to create a CSS navigation bar. All I want is my bar to contain an "up" image and "rollover" image states, and when clicked, will link to another page. The tutorials have seen include complex ways to manipulate links and a:link, a:hover states etc, and I just dont understand it. Can anyone help me?
__________________ PowerMac G4 | Dual 500 MHz | 640 RAM | OS 10.4.6 | CD-R/DVD-R | 64 VRAM PowerBook 100 | 4 RAM | OS 7.2 |
|
#2
| |||
| |||
|
a:link {color: black; text-decoration: none;} a:active{color:black; text-decoration: underline; } a:visited{ color:black; text-decoration: none;} a:hover {color:red; text-decoration:underline;} this will make a generic rollover with an underline on the text. if you want more help write back |
|
#3
| ||||
| ||||
|
Im asking for a navigation bar consisting of images that are buttons. There will be a normal state (one image) and the rollover state (second image). When clicked, you will be linked to another page. Thats all.
__________________ PowerMac G4 | Dual 500 MHz | 640 RAM | OS 10.4.6 | CD-R/DVD-R | 64 VRAM PowerBook 100 | 4 RAM | OS 7.2 |
|
#4
| ||||
| ||||
|
.buttonOne { backround-image: url(image.png); } .buttonOne:hover { background-image: url(imageOver.png); }
__________________ PowerMac G5 Dual 2.0Ghz | 1Gb | 250Gb | Bluetooth | NVidia GeForce 6800 Ultra DDL 256Mb | 20" Cinema Display | MX1000 Wireless Laser Mouse | OS X 10.3.9 PowerMac G4 400Mhz | 832Mb | 40Gb + 120Gb | OS X Server 10.3.8 - Web Dev, Proxy, Mail, NAT, Firewall, Backup Netgear Gigabit Switch | Sony Ericsson P910i Smartphone | iPod Colour 60Gb |
|
#5
| ||||
| ||||
|
check out this page. I've got a lot of stuff, but the buttons are in a seperate CSS file. http://pengu.uttx.net http://pengu.uttx.net/css/buttons.css
__________________ PowerMac G5 Dual 2.0Ghz | 1Gb | 250Gb | Bluetooth | NVidia GeForce 6800 Ultra DDL 256Mb | 20" Cinema Display | MX1000 Wireless Laser Mouse | OS X 10.3.9 PowerMac G4 400Mhz | 832Mb | 40Gb + 120Gb | OS X Server 10.3.8 - Web Dev, Proxy, Mail, NAT, Firewall, Backup Netgear Gigabit Switch | Sony Ericsson P910i Smartphone | iPod Colour 60Gb |
|
#6
| ||||
| ||||
| Code: ------
HTML
------
<ul id="navlist">
<li><a href="link.html" accesskey=" " title="Link Title Here">Link Text</a></li>
<li><a href="link.html" accesskey=" " title="Link Title Here">Link Text</a></li>
<li><a href="link.html" accesskey=" " title="Link Title Here">Link Text</a></li>
<li><a href="link.html" accesskey=" " title="Link Title Here">Link Text</a></li>
</ul>
------
CSS
------
#navlist {
margin: 0;
padding: 0;
list-style: none;
}
#navlist li a:link, #navlist li a:visited {
display: block;
width: 100px;
height: 30px;
color: #c03;
background: transparent url("imagename-normalstate.png") no-repeat top left;
}
#navlist li a:hover {
color: #039;
background: transparent url("imagename-overstate.png") no-repeat top left;
}
To make it horizontal, use a #navlist li rule with display:block; float: left; or display: inline. If you don't want to mess with all that, or at lest the back and forth, post a mock-up of how you want the image to look on the page and a copy of the normal and over states for the buttons and I'll write it up for you. Good tutorial: http://www.listamatic.com
__________________ . | mdnky@macosx.com | My Homepage | My Music | Restore the Pledge | MacOSX.com Widget | • MacBook Pro Core2Duo 2.33GHz 15", 2GB DDR2 RAM, 500GB 7200RPM, DL Superdrive, OS X 10.6, • Apple 23" Cinema HD Display, Apple Slim-Alum Keyboard, Apple BT Alum Keyboard, Logitech Optical Scroll Mouse • iPhone 3G, iPhone 8GB, iPod Photo 30GB, Nikon D50, Nikon L6, Epson 3490, Epson R1800, HP LaserJet 1200 • LaCie 500GB d2 Quadra, LaCie 160GB d2 FW, harman/kardon SoundSticks II, Mighty Mouse, iSight |
|
#7
| |||
| |||
| Quote:
bigdoug |
|
#8
| ||||
| ||||
|
no. if you look at the site i posted (a work in progress) you'll see they're added to each HREF, with an index-transparent PNG inside, with a class set to width: 100%; height: 100% i forgot to add the dimensions to the classes above.
__________________ PowerMac G5 Dual 2.0Ghz | 1Gb | 250Gb | Bluetooth | NVidia GeForce 6800 Ultra DDL 256Mb | 20" Cinema Display | MX1000 Wireless Laser Mouse | OS X 10.3.9 PowerMac G4 400Mhz | 832Mb | 40Gb + 120Gb | OS X Server 10.3.8 - Web Dev, Proxy, Mail, NAT, Firewall, Backup Netgear Gigabit Switch | Sony Ericsson P910i Smartphone | iPod Colour 60Gb |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Safari - Multiple Bookmarks Bar | bobw | Apple News, Rumors & Discussion | 2 | January 19th, 2009 05:03 AM |
| Movable Type CSS problems (rebuild destroys CSS) | michaelsanford | Design & Media | 0 | December 20th, 2004 10:36 AM |
| steel-like tool bar and menu bar ? | copo | Mac OS X System & Mac Software | 6 | June 13th, 2003 11:13 AM |
| Window title bar moves behind OS menu bar. | Brooks | Mac OS X System & Mac Software | 2 | December 11th, 2002 10:56 PM |