Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 05:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HTML/CSS] Frage: Navigation Hover/Selected/Selected Hover

Discussion on [HTML/CSS] Frage: Navigation Hover/Selected/Selected Hover within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Hydrox's Avatar
 
elite*gold: 0
Join Date: Feb 2006
Posts: 537
Received Thanks: 27
[HTML/CSS] Frage: Navigation Hover/Selected/Selected Hover

Hallo zusammen.
Ich bin gerade dabei ein Wordpress Layout umzusetzen
und habe in Photoshop eine schicke Navigation gebastelt.
Ich habe 5 Navipunkte, jedoch soll später im design unterschieden werden zwischen: Normal, Hover, Selected und Selected Hover.
Einen einfachen Hovereffekt konnte ich ganz einfach erzeugen mit:

Code:
<a href="http://lalala.lala/"><img src="http://localhost/wordpress/wp-content/themes/eskapism/images/home.png"></a> 
<img src="http://localhost/wordpress/wp-content/themes/eskapism/images/home.png" onmouseover="this.src='http://localhost/wordpress/wp-content/themes/eskapism/images/homeh.png'" onmouseout="this.src='http://localhost/wordpress/wp-content/themes/eskapism/images/home.png'"/>
Wie bekomme ich es nun hin, dass bei selektiertem Menüpunkt sich auch das Design des selben ändert? (Habe die Bilder dafür natürlich schon gesliced aber da ich der totalste Leihe bin komme ich an dieser Stelle nicht weiter.. =[ )

Danke schonmal
Hydrox is offline  
Old 08/28/2010, 17:10   #2
 
elite*gold: 0
Join Date: Aug 2006
Posts: 505
Received Thanks: 89
Quote:
Originally Posted by Hydrox View Post
Hallo zusammen.
Ich bin gerade dabei ein Wordpress Layout umzusetzen
und habe in Photoshop eine schicke Navigation gebastelt.
Ich habe 5 Navipunkte, jedoch soll später im design unterschieden werden zwischen: Normal, Hover, Selected und Selected Hover.
Einen einfachen Hovereffekt konnte ich ganz einfach erzeugen mit:

Code:
<a href="http://lalala.lala/"><img src="http://localhost/wordpress/wp-content/themes/eskapism/images/home.png"></a> 
<img src="http://localhost/wordpress/wp-content/themes/eskapism/images/home.png" onmouseover="this.src='http://localhost/wordpress/wp-content/themes/eskapism/images/homeh.png'" onmouseout="this.src='http://localhost/wordpress/wp-content/themes/eskapism/images/home.png'"/>
Wie bekomme ich es nun hin, dass bei selektiertem Menüpunkt sich auch das Design des selben ändert? (Habe die Bilder dafür natürlich schon gesliced aber da ich der totalste Leihe bin komme ich an dieser Stelle nicht weiter.. =[ )

Danke schonmal
kA was du mit selected und selected hover meinst, aber in CSS gibt es nur link, visited, active und hover.
Wenn ich es richtig verstanden habe willst du die Linkfarbe des Links von der Seite auf der du dich grade befindest andersfarbig haben. Das geht mit reinem CSS allerdings nicht.

Und für einen normalen Hover mach es am besten direkt komplett mit CSS.

Deine Navi würde ca. so aussehen:
Code:
<div class="navi">
			<ul>
				<li id="nav_home"> <a href="?home.html">Home</a> </li>
				<li id="nav_blog"> <a href="?blog.html">Blog</a> </li>
				<li id="nav_about"> <a href="?about.html">About</a> </li>
				<li id="nav_hilfe"> <a href="?hilfe.html">Hilfe</a> </li>
			</ul>
		</div>
Und deine CSS ca. so:
Code:
.navi ul li {
	list-style-type: none;
	background-repeat: no-repeat;
}

.navi ul li a {
  	width: 100%;
  	height: 100%;
	display: block;
}

.navi #nav_home {
	background-image: url(test.png);
	width: 60px;
	height: 60px;
}

.navi #nav_home a:hover {
	background-image: url(test_hover.png);
	width: 60px;
	height: 60px;
}
Solltest du selbst verstehen können und auf die anderen Menüpunkte anwenden.
kennyo is offline  
Reply


Similar Threads Similar Threads
[AutoIt] Buttons mit Hover Effekt?
05/11/2010 - General Coding - 2 Replies
Hallo, ich suche nach einer Möglichkeit, dass ich meinen Buttons, denen ich ein Hintergrundbild gegeben hab, einen Hover Effekt geben kann. Kennt jemand eine Lösung? Ich hab bis jetzt mit FileInstall eine Bilddatei hinzugefügt und das Bild auf den Button gelegt. Allerdings sieht er langweilig aus, da er nichts "macht" wenn man mit der Maus über ihn geht :( Greetz
Chams, Boxes, No Fog, Hover
01/14/2010 - Combat Arms Hacks, Bots, Cheats & Exploits - 4 Replies
Features: 1. Box ESP - Draw's Box's around players 2. Fly Hack - Hold Space bar to Fly. 3. No Fog - On maps such as Snow Valley, there is fog. Fog reduces your ability to see far distances in front of you. No fog removes the fog on the map enabling you to see what was hidden by the fog previously 4. Speed Hack - Increases your player's walking speed. 5. Tracer Bullets - Show's a colorful line in which your bullets fire. 6. Show FPS - Show's your "Frames per second". 7. Full Bright...
[Help Request]Shaiya Hover Board Item
10/30/2009 - Shaiya - 0 Replies
There is an item called snowboard for different classes Human Snowboard item ID 42025 The item works and what not but looks a little silly since there isn't snow and it goes up hill lol. I was wondering if there was a way to make this item add a value of 18 or so to a characters Y coord to make it a hover board? Is this possible if so how would such an item change be implemented and updated with character movements?
Selected my picture
08/23/2009 - Silkroad Online - 9 Replies
Finally, I selected the picture. ^ ^:pimp: http://img149.imageshack.us/img149/2499/asdasdm.p ng
ECSRO, Hover over equips, or press Options
07/18/2008 - SRO Private Server - 6 Replies
urrr, So I just got ECSRO, mmm the server traffic wasn't too bad, only took me like 5min to log in, but I seem to have lots of d'c errors, tried searching forums and no one has same problem as me. 1 - Apparently if i hover my mouse over any equipment item, the game crashes. =OO Shocking I know 2 - If i press Options, the game also crashes. 3 - Iunno yet, but there are probably lots more things that if i get near them the game will crash. Oh, and btw iz my first post, rawr I'm Craznn,...



All times are GMT +1. The time now is 05:10.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.