Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-01 13:12:30

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

logo doesn't show up

in a top left of this page should show up a logo which links to homepage. if i take a look into source page – the link is there, but somehow it doesn’t show up! i have been rechecked over 10 times but still can’t find the error

my page:

	<div id="frontpage">
<a href="<txp:link_to_home />" class="logo"></a>
	</div>

my css:


#frontpage {
margin: 0;
padding: 0 ;
float:left;
height: 190px;
width:250px;
}

a.logo{
background:transparent url(/images/68.gif) no-repeat 0 0;
margin:0;
padding:0 ;
height:100px;
width:210px;
}

a.logo:hover{
background:transparent url(/images/68.gif) no-repeat 0 -100px;
}

similar solution in other page works

Offline

#2 2009-02-01 13:42:11

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: logo doesn't show up

Firstly’ I think you actually need to link to something, even if it’s only &bnsp;, but it would be better as your <txp:site_name />. Secondly, you need to make your anchor a block element for the size to function, e.g. for a specify display:block;. If you include the site name, you can also add overflow:hidden; text-indent:-999em; to make the text disappear while your background image remains.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-02-01 14:11:42

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: logo doesn't show up

yep, it work’s again, great! thank you

but i don’t understand, why my solution works correctly in an other page

Offline

#4 2009-02-01 21:05:24

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: logo doesn't show up

Gallex wrote:

but i don’t understand, why my solution works correctly in an other page

Because the code is different, not same. You are missing float from your code. Inline elements can’t take width nor height with out float or display: block;. That’s why the other, with different code, works.

Offline

Board footer

Powered by FluxBB