johnwp
Grünschnabel
Hallo Zusammen!
Ich arbeite mich seit einiger Zeit in html und CSS ein und habe zur Zeit ein Problem, bei dem ihr mir vielleicht weiterhelfen könnt.
Und zwar möchte ich eine Navigationsleiste erstellen, die nur aus Images besteht. Anbei der Quellcode:
<div align="center" style="border:1px solid black; padding:10px;">
<ul id="navibereich">
<li id="navi1">
<a href="#">
 
</a>
</li>
<li id="navi2">
<a href="#">
 
</a>
</li>
<li id="navi3">
<a href="#">
 
</a>
</li>
<li id="navi4">
<a href="#">
 
</a>
</li>
</ul>
</div>
*/CSS*/
<style>
#navibereich li {display:inline; list-style-typ: none;}
#navi1 a {border:0px solid red; margin-top:20px; margin-right: -20px; margin-left: 60px; height: 224px; width: 266px;}
#navi1 a:link {text-decoration:none; background-image: url(aboutus1.png); background-repeat:no-repeat; background-position:left center;}
#navi1 a:visited {text-decoration:none; background-image: url(aboutus1.png); background-repeat:no-repeat; background-position:left center;}
#navi1 a:focus {text-decoration:none;}
#navi1 a:active {text-decoration:none;background-image: url(aboutus3.png); background-repeat:no-repeat; background-position:left center;}
#navi1 a:hover {text-decoration:none; color: pink; background-image: url(aboutus2.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a {border:0px solid blue;height: 224px;margin-top:20px; width: 266px;}
#navi2 a:link {text-decoration:none; background-image: url(sustainable1.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a:visited {text-decoration:none; background-image: url(sustainable1.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a:focus {text-decoration:none;}
#navi2 a:active {text-decoration:none; background-image: url(sustainable3.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a:hover {text-decoration:none; background-image: url(sustainable2.png); background-repeat:no-repeat; background-position:left center; }
#navi3 a {border:0px solid green; height: 224px;margin-top:20px; margin-left:20px; width: 266px;}
#navi3 a:link {text-decoration:none;background-image: url(participate1.png); background-repeat:no-repeat; background-position:left center;}
#navi3 a:visited {text-decoration:none; background-image: url(participate1.png); background-repeat:no-repeat; background-position:left center;}
#navi3 a:focus {text-decoration:none;}
#navi3 a:active {text-decoration:none;background-image: url(participate3.png); background-repeat:no-repeat; background-position:left center;}
#navi3 a:hover {text-decoration:none;background-image: url(participate2.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a {border:0px solid yellow; height: 224px;margin-top:20px; margin-left:20px; width: 266px;}
#navi4 a:link {text-decoration:none;background-image: url(blog1.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a:visited {text-decoration:none; background-image: url(blog1.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a:focus {text-decoration:none;}
#navi4 a:active {text-decoration:none;background-image: url(blog3.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a:hover {text-decoration:none; background-image: url(blog2.png); background-repeat:no-repeat; background-position:left center;}
</style>
Das ganze funktioniert auch einwandfrei im IE8. Jedoch nicht in den anderen Browsern und auch nicht wenn ich das ganze auf den Server lade.
Kann mir da vielleicht jemand weiterhelfen. Ich wäre sehr sehr dankbar !!
Ich arbeite mich seit einiger Zeit in html und CSS ein und habe zur Zeit ein Problem, bei dem ihr mir vielleicht weiterhelfen könnt.
Und zwar möchte ich eine Navigationsleiste erstellen, die nur aus Images besteht. Anbei der Quellcode:
<div align="center" style="border:1px solid black; padding:10px;">
<ul id="navibereich">
<li id="navi1">
<a href="#">
 
</a>
</li>
<li id="navi2">
<a href="#">
 
</a>
</li>
<li id="navi3">
<a href="#">
 
</a>
</li>
<li id="navi4">
<a href="#">
 
</a>
</li>
</ul>
</div>
*/CSS*/
<style>
#navibereich li {display:inline; list-style-typ: none;}
#navi1 a {border:0px solid red; margin-top:20px; margin-right: -20px; margin-left: 60px; height: 224px; width: 266px;}
#navi1 a:link {text-decoration:none; background-image: url(aboutus1.png); background-repeat:no-repeat; background-position:left center;}
#navi1 a:visited {text-decoration:none; background-image: url(aboutus1.png); background-repeat:no-repeat; background-position:left center;}
#navi1 a:focus {text-decoration:none;}
#navi1 a:active {text-decoration:none;background-image: url(aboutus3.png); background-repeat:no-repeat; background-position:left center;}
#navi1 a:hover {text-decoration:none; color: pink; background-image: url(aboutus2.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a {border:0px solid blue;height: 224px;margin-top:20px; width: 266px;}
#navi2 a:link {text-decoration:none; background-image: url(sustainable1.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a:visited {text-decoration:none; background-image: url(sustainable1.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a:focus {text-decoration:none;}
#navi2 a:active {text-decoration:none; background-image: url(sustainable3.png); background-repeat:no-repeat; background-position:left center;}
#navi2 a:hover {text-decoration:none; background-image: url(sustainable2.png); background-repeat:no-repeat; background-position:left center; }
#navi3 a {border:0px solid green; height: 224px;margin-top:20px; margin-left:20px; width: 266px;}
#navi3 a:link {text-decoration:none;background-image: url(participate1.png); background-repeat:no-repeat; background-position:left center;}
#navi3 a:visited {text-decoration:none; background-image: url(participate1.png); background-repeat:no-repeat; background-position:left center;}
#navi3 a:focus {text-decoration:none;}
#navi3 a:active {text-decoration:none;background-image: url(participate3.png); background-repeat:no-repeat; background-position:left center;}
#navi3 a:hover {text-decoration:none;background-image: url(participate2.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a {border:0px solid yellow; height: 224px;margin-top:20px; margin-left:20px; width: 266px;}
#navi4 a:link {text-decoration:none;background-image: url(blog1.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a:visited {text-decoration:none; background-image: url(blog1.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a:focus {text-decoration:none;}
#navi4 a:active {text-decoration:none;background-image: url(blog3.png); background-repeat:no-repeat; background-position:left center;}
#navi4 a:hover {text-decoration:none; background-image: url(blog2.png); background-repeat:no-repeat; background-position:left center;}
</style>
Das ganze funktioniert auch einwandfrei im IE8. Jedoch nicht in den anderen Browsern und auch nicht wenn ich das ganze auf den Server lade.
Kann mir da vielleicht jemand weiterhelfen. Ich wäre sehr sehr dankbar !!