开发者

Anyone know why my logo is showing twice?

Anyone know why my logo is showing twice in ?

html:

<div id="logo"><a href="/Presidente Prude/oferta_do_dia" class="link">
        <font color="#264D73"><img src="/static/css/i/logo.png" alt="Cidade Louca" /></font></a></div>

css:

#logo {
w开发者_StackOverflow社区idth: 400px;
height: 125px;
margin: 3px 0 0 0;
position: absolute;
background: url(i/logo.png) no-repeat;
}

thank you ...


That is because you're setting it twice - once as the div's background and again as an img tag. Remove one of them, it should be fine.

<div id="logo">
    <a class="link" href="/Presidente Prude/oferta_do_dia">
        <font color="#264D73"><img alt="Cidade Louca" src="/static/css/i/logo.png"></font>  
    </a>
</div>


Because you have the logo set as the background for the #logo div and you also have it as an image within that div.


You have both a <div id="logo"> with a background-image set, and a <img> tag inside that div with the src set to the same image.

Either remove the background-image attribute from the div, or remove the image.


you have added the logo on your css:

 #logo {
 width: 400px;
 height: 125px;
 margin: 3px 0 0 0;
 position: absolute;
 background: url(i/logo.png) no-repeat;
 }

and in your html:

 <img src="/static/css/i/logo.png" alt="Cidade Louca">

you should delete one.


It's in your HTML, as an <img> inside the #logo div...

<div id="logo"><a href="/Presidente Prude/oferta_do_dia" class="link">
        <font color="#264D73"><img src="/static/css/i/logo.png" alt="Cidade Louca" /></font></a></div>

And it's also in your stylesheet, but this time as a background image of the #logo div...

#logo{width:400px;height:125px;margin:3px 0 0 0;position:absolute;background:url(i/logo.png) no-repeat}

Simply remove one or the other as per the following....

If you want the logo to have a hyperlink, leave the HTML alone (except remove the unneeded font tags) and modify your CSS to this...

#logo{width:400px;height:125px;margin:3px 0 0 0;position:absolute;}

If you do not care about attaching a hyperlink to the logo, leave the CSS alone and modify your HTML to this...

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜