Hallo,
ich erstelle gerade eine Startseite für ein Browsergame (Soll nicht funktionieren sondern erstmal nur gut aussehen xD)
Bisher habe ich mouseover immer direkt in HTML geschriben anstatt in css. ICh weiß das sowas ins css file gehört aber ich habs bis jetzt immer im html file gemacht weil ich das irgendwo gesehen hatte ;)
Nun möchte ich aber gerne das die Seite die aktiv ist ein anderen Button lädt. Also das Bild des Buttons.
Bisher habe ich drei Buttons. Normal,active & mouseover. Nur wie bekomme ich den aktiven button darein? Da ich gerade PHP lerne dachte ich mir das das auch mit einer if else anweisung funzen könnte aber ich weiß nicht wie!!
In etwa so:
if
-->link<-- geöffnet lade -->URL zum Bild (active)
else
lade --> URL zum Bild (normal)
oder geht das mit css?? wenn ja wie???
Ich würde gerne sowiso die mouseover sachen im css file machen aber ich habs noch nie gemacht und weiß nich wie^^
HIer mal das html file (bzw das wird noch ein php file wegen registrierung und so)
lg
ich erstelle gerade eine Startseite für ein Browsergame (Soll nicht funktionieren sondern erstmal nur gut aussehen xD)
Bisher habe ich mouseover immer direkt in HTML geschriben anstatt in css. ICh weiß das sowas ins css file gehört aber ich habs bis jetzt immer im html file gemacht weil ich das irgendwo gesehen hatte ;)
Nun möchte ich aber gerne das die Seite die aktiv ist ein anderen Button lädt. Also das Bild des Buttons.
Bisher habe ich drei Buttons. Normal,active & mouseover. Nur wie bekomme ich den aktiven button darein? Da ich gerade PHP lerne dachte ich mir das das auch mit einer if else anweisung funzen könnte aber ich weiß nicht wie!!
In etwa so:
if
-->link<-- geöffnet lade -->URL zum Bild (active)
else
lade --> URL zum Bild (normal)
oder geht das mit css?? wenn ja wie???
Ich würde gerne sowiso die mouseover sachen im css file machen aber ich habs noch nie gemacht und weiß nich wie^^
HIer mal das html file (bzw das wird noch ein php file wegen registrierung und so)
PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>be-a-pilot.de | Werde Pilot!</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta name="author" content="Patrick">
<meta name="editor" content="html-editor phase 5">
</head>
<body>
<div id="header"><img src="img/content_01.png" alt="header"></div>
<div id="content"><img src="img/content_06.png" alt="content"></div>
<div id="top_reg"><img src="img/content_05.png" alt="top_reg"></div>
<div id="platzhalter1"><img src="img/footer_03.png" alt="platzhalter1"></div>
<div id="reg"><img src="img/content_07.png" alt="reg"></div>
<div id="platzhalter2"><img src="img/platzhalter2_08.png" alt="platzhalter2"></div>
<div id="footer"><img src="img/content_10.png" alt="footer"></div>
<div id="navigation">
<div id="navigation_home"><a href="index2.html"><img src="img/button_HOME_normal.png"
onmouseover="this.src='img/button_HOME_mouseover.png'"
onmouseout="this.src='img/button_HOME_normal.png'" border="0" alt="home button"></a></div>
<div id="navigation_ueber"><a href="ueber.html"><img src="img/button_UEBER_normal.png"
onmouseover="this.src='img/button_UEBER_mouseover.png'"
onmouseout="this.src='img/button_UEBER_normal.png'" border="0" alt="ueber button"></a></div>
<div id="navigation_status"><a href="status.html"><img src="img/button_STATUS_normal.png"
onmouseover="this.src='img/button_STATUS_mouseover.png'"
onmouseout="this.src='img/button_STATUS_normal.png'" border="0" alt="status button"></a></div>
<div id="navigation_forum"><a href="forum.html"><img src="img/button_FORUM_normal.png"
onmouseover="this.src='img/button_FORUM_mouseover.png'"
onmouseout="this.src='img/button_FORUM_normal.png'" border="0" alt="forum button"></a></div>
</div>
</body>
</html>
lg