XHTMLforum

XHTMLforum (http://xhtmlforum.de/index.php)
-   CSS (http://xhtmlforum.de/forumdisplay.php?f=73)
-   -   Problem bei Link Pseudo - Elemente innerhalb ID (http://xhtmlforum.de/showthread.php?t=44529)

vidar 16.02.2007 11:07

Problem bei Link Pseudo - Elemente innerhalb ID
 
Hallo zusammen!
Vielleicht weiß der eine oder andere Rat bei folgendem Problem: Die Styles für die Links sollte im Status "link, visited" innerhalb von "area1" rot/unterstrichen und innerhalb von "area2" blau/nicht unterstrichen sein. "area1" bekommt aber den Style von "area2"?? Abhilfe schafft hier die einzelne Definition aller Pseudo - Elemente. Nur warum? Kann ich die Gruppierung von mehreren Pseudo - Elementen bei einem Style bei Beschränkung auf einen ID-Bereich nicht verwenden? Selbst der Link "keine Area" bekommt diesen Style??? Das Problem tritt bei allen von mir getesteten Brwosern auf. (FF 1.*, IE 6, Netsi7, Opera 8.5)
Gruss Vidar

Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<head>
        <title>Test</title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
       
<style>
#area1 a:link, a:visited {
        color: #ff0000; /*rot*/
        text-decoration: none;
}

#area1 a:hover, a:active {
        color: #ff0000; /*rot*/
        text-decoration: underline;
}


#area2 a:link, a:visited {
        color: #0080FF; /*blau*/
        text-decoration: underline;
}

#area2 a:hover, a:active {
        color: #0080FF; /*blau*/
        text-decoration: none;
}

</style>
</head>

<body>

<div id="area1">
<a href="#">Area 1</a>
</div>

<div id="area2">
<a href="#">Area 2</a>
</div>

<a href="#">keine Area</a>

</body>
</html>


fricca 16.02.2007 11:12

Code:

#area1 a:link, #area1 a:visited
usw.

vidar 16.02.2007 11:16

na klar, vollständig definieren geht natürlich! manchmal ist die lösung so einfach... thx :o


Alle Zeitangaben in WEZ +2. Es ist jetzt 10:11 Uhr.

Powered by vBulletin® Version 3.8.11 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

© Dirk H. 2003 - 2023