...

View Full Version : DIV and External CSS



creativemind
11-10-2008, 02:31 AM
Hi all,

I am trying to add a link to my logo using DIV and external CSS. Here is what I got so far:

HTML:


<div id="logo"></div>


External CSS:


#logo {

background:url(assets/logos/dragon14.gif) center repeat-y ;
display: block;
margin:0 auto;
width: 953px;
height: 130px;
text-align: center;

}




I was able to make the logo to show up but was not sure on how to add a link on the logo so it will link to the home or index.html web page.

Thanks in advanced!!

twodayslate
11-10-2008, 03:58 AM
<div id="logo">
<a href="http://site.com" title="site name"><img src="#" alt="site name" /></a>
</div>

abduraooft
11-10-2008, 07:50 AM
How about


#logo {
background:url(assets/logos/dragon14.gif) center repeat-y ;
display: block;
margin:0 auto;
width: 953px;
height: 130px;
text-align: center;
text-indent:-9999px;
}

<a id="logo">Some text for robots</a>

Apostropartheid
11-10-2008, 06:38 PM
I would advise highly against using a background image. These images have meaning in this context and therefore should be used as a physical img with descriptive alt text.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum