Jeg har lavet div's med a formattering som viser baggrundsbilleder og forskellige baggrundsfarver ved a:hover, på en undermenu til venstre.
Men da jeg tilføjede generel a formatteirng i css, synes det som om, at denne formattering 'overskriver' formatteringen på div'sene (de stiplede linjer i bunden og textfarven).
Det mærkeligste er, at på a:hover, virker den korrekte text farve i div formatteringen.
Problemet er, at jeg ikke kan fjerne den generelle a formatteirng fra div formatteringen.
(Se koden '#leftmenu_wrapper' og nedefter i følgende kode).
Se siden:
http://www.proevestenen.dk/temp/index.php?pageid=1CSS:
/*------------- Basic layout --------------*/
body {
/*background-image: url(img/bg.gif);
background-repeat: repeat;*/
background: #88a2b4 url(img/bg.gif) top left fixed repeat-x;
margin: 0px;/*main margin, frame*/
padding:0px;/* set margin in Opera*/
border:0px;
text-align: center;/*center layout - IE*/
font-family: verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 70%;
}
#container {
background: #f3f2ed url(img/container_bg.jpg) repeat;
color: #333;
margin:0px auto;/*centrerer layout i mozilla/opera*/
padding: 3px 10px 3px 10px;
/*border-top: 3px solid #f3f2ed;*/
width: 744px; /* bmh */
height: auto;
voice-family: "\\"}\\"";
voice-family:inherit;
width: 742px;
text-align:left;
}
html>body #container {/* hack set width in Mozilla, Opera*/
width: 724px;
}
#main_wrapper {
width: 100%;
background-image:url('img/main_bg.gif');
margin-bottom: 10px;
}
#main_wrapper_content {
width: 100%;
background-image:url('img/main_bg_content.gif');
margin-bottom: 10px;
}
html>body#main_wrapper_content { /* hack for at sætte width i Mozilla, Opera*/
margin-top: 10px;
}
#main_left {
float: left;
padding: 15px;
width: 50%;
}
#main_left_content {
float: left;
padding: 0;
width: 169px;
}
html>body div#main_left { /* hack for at sætte width i Mozilla, Opera*/
width: 45%;
}
html>body div#main_left_content { /* hack for at sætte width i Mozilla, Opera*/
width: 169px;
}
#leftmenu_wrapper {
border-bottom: 1px solid #fff;
}
div.leftmenu_on a span {
FILTER: DropShadow(Color=#807b67, OffX=1, OffY=1, Positive=1); width:100px; height: 15px; cursor: pointer;
}
div.leftmenu_off a span {
FILTER: DropShadow(Color=#807b67, OffX=1, OffY=1, Positive=1); width:100px; height: 15px; cursor: pointer;
}
div.leftmenu_on { /* layout for mozilla, opera */
drdoc: ";
drdoc: "";
background: #bcceda url(img/link_hjoerne.gif) bottom right fixed no-repeat;
width: 169px;
height: 35px;
padding: 15px 0 0 0;
margin: 0px;
border-top: 1px solid #fff;
text-align: left;
/*";/* IE */
}
div.leftmenu_on a {
width: 169px;
height: 50px;
padding: 20px 10px 20px 10px;
background: #bcceda url(img/link_hjoerne.gif) bottom right fixed no-repeat;
border-top: 1px solid #fff;
text-decoration: none;
text-align: left;
font-size:12px;
font-weight:bold;
letter-spacing: 1px;
color: #fff;
drdoc: ";
drdoc: "";
padding: 15px;
border-top: 0px solid #fff;
/*";/* IE */
border-bottom-width: 0;
}
div.leftmenu_on a:hover {
drdoc: ";
drdoc: "";
color: #658ca7;
/*";/* IE begin again */
}
div.leftmenu_off { /* layout for mozilla, opera */
drdoc: ";
drdoc: "";
background: #658ca7;
width: 169px;
height: 35px;
padding: 15px 0 0 0;
margin: 0px;
border-top: 1px solid #fff;
text-align: left;
/*";/* IE begin again */
}
div.leftmenu_off a {
width: 169px;
height: 50px;
padding: 20px 10px 20px 10px;
background: #658ca7;
border-top: 1px solid #fff;
text-decoration: none;
text-align: left;
font-size:12px;
font-weight:bold;
letter-spacing: 1px;
color: #fff;
drdoc: ";
drdoc: "";
padding: 15px;
border-top: 0px solid #fff;
/*";/* IE begin again */
border-bottom-height: 0;
}
div.leftmenu_off a:hover {
width: 169px;
height: 50px;
padding: 20px 10px 20px 10px;
background: #bcceda url(img/link_hjoerne.gif) bottom right fixed no-repeat;
border-top: 1px solid #fff;
text-decoration: none;
text-align: left;
font-size:12px;
font-weight:bold;
letter-spacing: 1px;
color: #fff;
drdoc: ";
drdoc: "";
padding: 15px;
border-top: 0px solid #fff;
background: #658ca7;
/*";/* IE begin again*/
border-bottom-height: 0;
}
div.leftmenu_off a:hover {
drdoc: ";
drdoc: "";
color: #bcceda;
/*";/* IE */
}
/*-- general link format --*/
a:link {
font-family: verdana, Geneva, Arial, Helvetica, sans-serif; font-weight: normal; color: #02226a;
text-decoration: none;
border-bottom: 1px dotted #02226a;
}
a:visited {
font-family: verdana, Geneva, Arial, Helvetica, sans-serif; font-weight: normal; color: #023098;
text-decoration: none;
border-bottom: 1px dotted #023098;
}
a:hover {
font-family: verdana, Geneva, Arial, Helvetica, sans-serif; font-weight: normal; color: #88a2b4;
text-decoration: none;
border-bottom: 1px dotted #88a2b4;
}
a:active {
font-family: verdana, Geneva, Arial, Helvetica, sans-serif; font-weight: normal; color: #023098;
text-decoration: none;
border-bottom: 1px dotted #023098;
}
.nounderline {
border-bottom-width: 0;
}