I have a link surrounding an image and div (caption) that is styled correctly when it is NOT a link, but as soon as a link is added to surround it, the default link colors/fonts/etc are added. I cannot seem to override the inheritance of the link properties. Below is a VERY simplified version of the page HTML and the full CSS file (sorry, but i do not know enough CSS to know what might be affecting this). I CANNOT apply any class to the H2, H3, or P within "caption" as they are coming from a CMS. I can apply a class to the A tag if necessary.
When NO link is present, the text looks nice. Once I surround it with the <a> i get the bold & blue paragraph. It looks to me like the H2 is behaving correctly, so only the Paragraph tag is a problem.
THANKS!
<html>
<body>
<div id="container">
<div id="main">
<div id="body">
<h1 class="txt-centered"><em>Page</em> Title Here</h1>
<p>Generic paragraph about this page</p>
<div class="infographic-grid">
<ul>
<li>
<img src="/images/library/Decorations.jpg" alt="Decorations" />
<div class="caption">
<h2>INVITATIONS</h2>
<p>invitation information goes here</p></div>
</li>
<li>
<a href="http://www.example.com/stuff/">
<img src="/images/library/chicken.jpg" alt="food" />
<div class="caption">
<h2>MENU</h2>
<p>Quesadillas and pie</p>
</div>
</a>
</li>
</div>
</div>
</div>
</div>
</body>
</html>
* {font-size: 100.01%;}
.txt-centered
{
text-align: center;
}
html {font-size: 62.5%;}
body{
background:url(../images/bg-body.gif) 50% 0;
font:1.3em Arial, Helvetica, Verdana, sans-serif;
color:#000;
}
a{
color:#000;
text-decoration:none;
}
a:hover{
color:#005984;
text-decoration:underline;
}
/* container */
#container{
width:944px;
margin:0 auto;
}
/* flash */
#container .flash-holder{
font-size:0;
line-height:0;
position:relative;
z-index:2;
}
/* main */
#main{
background:url(../images/bg-main.gif) repeat-y;
overflow:hidden;
width:100%;
position:relative;
z-index:1;
margin-top:-44px;
padding-top:44px;
}
#container .sub-main{background:url(../images/bg-sub-main.gif) repeat-y;}
.main-holder{
float:left;
width:754px;
position:relative;
}
/* body */
#body{
padding:44px 19px 0;
line-height:1.38em;
margin:-44px 0 0 190px;
max-width:716px;
}
* html #body{
float:right;
margin:-44px 0 0;
}
.fancy-background{
background:url(../images/bg-fancy.png) no-repeat;
padding:44px 19px 215px !important;
}
#body h1{
font-size: 2.62em;
font-family: "Times New Roman", Times, Georgia, serif;
line-height: 1.3;
font-weight:normal;
color:#1391c1;
margin:0 0 20px;
display:block;
}
#body h1 em{font-size:2.06em;}
#body h1 i{font-size:2.35em;}
/* frame */
#body .frame-holder{
position:relative;
height:306px;
width:550px;
margin:0 auto 14px;
padding:95px 0 0 130px;
}
#body .frame-holder .framed{display:block;}
#body .frame{
background:url(../images/bg-frame.png) no-repeat;
height:401px;
width:680px;
position:absolute;
top:0;
left:0;
}
#body .alignright{
float:right;
padding:5px 0 5px 5px;
}
#body .alignleft{
float:left;
padding:5px 15px 5px 0;
}
#body strong{
color:#1391c1;
font:bold 1.15em "Times New Roman", Times, Georgia, serif;
}
#body p{margin-bottom:23px;}
#body p a{
text-decoration:underline;
color:#005984;
font-weight:bold;
}
#body p a:hover{text-decoration:none;}
#body h2{
margin-bottom:4px;
color:#0f6c8f;
font:bold 1.85em "Times New Roman", Times, Georgia, serif;
letter-spacing:-1px;
}
/* buttons-block */
#body .buttons-block{
margin:0 0 39px;
}
#body .buttons-block ul{text-align:center;}
#body .buttons-block ul li{
display:inline;
padding:0 5px;
background:none;
}
#body h3{
margin-bottom:7px;
color:#0f6c8f;
font:bold 1.38em "Times New Roman", Times, Georgia, serif;
letter-spacing:-1px;
}
/* ribbon */
#body .ribbon{
background:url(../images/bg-ribbon.gif) repeat-x;
height:80px;
margin:0 -19px 25px;
}
#body ul{margin-bottom:20px;}
#body ul li{
background:url(../images/bullet-black-square.gif) no-repeat 0 7px;
padding-left:10px;
}
#body ul a{
text-decoration:underline;
color:#005984;
font-weight:bold;
}
#body ul a:hover{text-decoration:none;}
#body ul ul{margin:0;}
/* section */
#body .section{
overflow:hidden;
height:1%;
}
/* infographic-grid */
#body .infographic-grid{
font-size:0.85em;
line-height:15px;
color:#666;
overflow:hidden;
height:1%;
padding:50px 0 0 39px;
}
#body .infographic-grid ul{text-align:left;}
#body .infographic-grid ul li{
display:inline-block;
vertical-align:top;
width:290px;
margin:0 11px 11px;
padding:0;
background:none;
}
* html #body .infographic-grid ul li{
display:inline;
height:1%;
}
* +html #body .infographic-grid ul li{
display:inline;
height:1%;
}
#body .infographic-grid ul li img{
display:block;
margin-bottom:6px;
vertical-align:top;
}
#body .caption h2
{
color:#036;
font:1.45em "Times New Roman", Times, Georgia, serif;
margin-bottom:1px;
letter-spacing:0;
}
#body .caption h3
{
font:1em Arial, Helvetica, sans-serif;
color:#69c;
margin-bottom:7px;
letter-spacing:0;
}
#body .caption p
{
text-decoration:none;
}
/* ship */
#body .ship{background:none;}
#main .fancy-background .ship{
background:url(../images/img-ship.gif) no-repeat;
height:215px;
width:535px;
position:absolute;
bottom:0;
left:190px;
}
/* menu */
#menu{
width:190px;
float:left;
font:1.08em/1.46em "Times New Roman", Times, Georgia, serif;
}
#menu ul{
text-transform:uppercase;
width:100%;
overflow:hidden;
position:relative;
}
#menu ul li{
overflow:hidden;
width:100%;
}
#menu ul li .bullet{
padding-left:20px;
float:left;
}
#menu ul a{
display:block;
padding:5px 5px 6px 0;
color:#fff;
text-decoration:none;
overflow:hidden;
height:1%;
}
#menu ul a:hover{
text-decoration:none;
color:#fff;
}
#menu ul li.liBullet .bullet{background:none;}
#menu ul li.liClose .bullet{background:url(../images/arrow-accordion.gif) no-repeat 9px 100%;}
#menu ul li.liOpen .bullet{background:url(../images/arrow-accordion-hover.gif) no-repeat 6px 100%;}
#menu ul ul{
background:#95adcc;
font-size:0.93em;
text-transform:none;
font-weight:bold;
}
#menu ul ul a{color:#052342;}
#menu ul ul a:hover{color:#052342;}
#menu ul ul li.liBullet .bullet{background:none;}
#menu ul ul li.liClose .bullet{background:url(../images/arrow-slide.gif) no-repeat 9px 100%;}
#menu ul ul li.liOpen .bullet {background:url(../images/arrow-slide-hover.gif) no-repeat 6px 100%;}
#menu ul ul ul li.liBullet .bullet{background:none;}
#menu ul ul ul li.liClose .bullet{background:url(../images/arrow-slide.gif) no-repeat 9px 100%;}
#menu ul ul ul li.liOpen .bullet {background:url(../images/arrow-slide-hover.gif) no-repeat 6px 100%;}
#menu ul ul ul{font-size:0.85em;}
#menu ul ul ul a{color:#fff;}
#menu ul ul ul a:hover{color:#fff;}
/* sidebar */
#sidebar{
width:165px;
float:right;
min-height:2000px;
padding:52px 11px 0 14px;
margin:-44px 0 0 19px;
background:#062343;
}
* html #sidebar{
margin:-44px 0 0;
}
* +html #sidebar{
margin:-44px 0 0;
}
#sidebar ul{margin-bottom:29px;}
#sidebar ul li{
margin-bottom:13px;
}
/* form */
#sidebar form fieldset{
overflow:hidden;
width:100%;
}
#sidebar form label{
float:left;
color:#9fb9da;
font-size:0.85em;
font-weight:bold;
margin:0 0 8px;
}
#sidebar form .text{
float:left;
background:url(../images/bg-input.gif);
height:22px;
width:153px;
padding:0 4px;
margin-bottom:8px;
}
#sidebar form .text input{
float:left;
border:0;
background:none;
width:153px;
padding:4px 0;
font:12px Arial, Helvetica, sans-serif;
}
#sidebar form .submit{
display:block;
background:url(../images/btn_form_email-submit.gif);
border:0;
width:75px;
height:31px;
margin:0 auto;
cursor:pointer;
}
/* footer */
#footer{
background:#95accb url(../images/bg-footer.gif) repeat-x;
text-align:center;
font-size:0.92em;
color:#fff;
padding:6px 0 8px;
}
#footer ul{
font:1.33em "Times New Roman", Times, Georgia, serif;
color:#052342;
margin-bottom:12px;
}
#footer ul li{
display:inline;
background:url(../images/bullet-star.gif) no-repeat 0 3px;
padding:0 0 0 18px;
}
#footer ul li:first-child{background:none;}
#footer ul a{
color:#052342;
text-decoration:underline;
}
#footer ul a:hover{text-decoration:none;}
#footer p a{color:#fff;}
#footer p a.spacer{
margin-left:10px;
}
#footer p a:hover{
color:#005984;
text-decoration:underline;
}