• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

IE Problem bei Textwechsel eines Links.

Tom99

New member
Hallo Community.

Ich brauch mal wieder eure Hilfe, ich habe mit CSS ein Textwechsler für Links gebastellt. Dieser funktioniert auch supe rim Firefox aber eben nicht mit dem Internet Explorer. Wenn ich nähmmlich dort über denn Link fahre passiert garnichts und erst beim Ancklicken!!! ändert sich die Schriftt, leider ist man dann meist schon auf einer anderen Seite. außerdem wird der Text mehrer px nach rechts verschoben.
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta
 content="text/html; charset=ISO-8859-1"
 http-equiv="content-type"><title>link test</title><style
 type="text/css">
div a em {
display: none;
}
div {
background-color: #6666cc;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
color: #ffffff;
height: 20px;
text-align: center;
font-style: normal;
width: 145px;
}
div a {
color: #ffffff;
height: 100%;
width: 100%;
display: block;
}
div a:hover em {
display: block;
}
div a:hover i {
display: none;
}
div i {
font-style: normal;
font-family: Arial,Helvetica,sans-serif;
}
div em {
font-style: normal;
font-family: Arial,Helvetica,sans-serif;
}
</style>
</head><body><div><a href="#1"><i>Ein
Text</i><em>Der
zweite text</em></a></div>
</body></html>
 
Versuch's mal so:
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>link test</title>
<style type="text/css">
div a em {
display: none;
}
div {
background-color: #6666cc;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
color: #ffffff;
height: 20px;
text-align: center;
font-style: normal;
width: 145px;
}
div a:link {
color: #ffffff;
height: 20px;
width: 100%;
display: block;
}
div a:visited {
color: #ffffff;
height: 20px;
width: 100%;
}
div a:hover {
display: block;
}
div a:hover em {
display: block;
}
div a:hover i {
display: none;
}
div i {
font-style: normal;
font-family: Arial,Helvetica,sans-serif;
}
div em {
font-style: normal;
font-family: Arial,Helvetica,sans-serif;
}
</style>
</head><body>
<div><a href="#1"><i>Ein Text</i><em>Der zweite text</em></a></div>
</body></html>
 
Zuletzt bearbeitet:
Zurück
Oben