468,316 Members | 1,992 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Background Image as Link

Hello,
I am having trouble placing a link on a background image that is located within a div that is positioned as absolute. I was able to properly place a link on a background image in another page that was located within a div with relative positioning. However, I am having trouble getting the same CSS hack to work on a div that is positioned as absolute. see below. any suggestions would be helpful. I am viewing this in IE7.
Regards



CSS:
#menuheader a

{

\\position: absolute;top:0px;left:19%;
background: url('/images/header3.jpg');
background-repeat:no-repeat;
height: 58px;
width:780px;
z-index:1;
display:block;
padding-bottom:5px;
}

#menuheader a span {
visibility: hidden;
}


HTML:
<div id="menuheader">

<a href="/index.asp" title="Intranet" ><span>Intranet</span></a>
</div>
Jan 11 '08 #1
1 1259
garrow
32
What problem are you having with this code?
It renders correctly within the context you have provided.

If you have an absolutely positioned element inside a relatively positioned element, the absolute element with treat the containing element as its reference instead of the whole window or viewport.
This could be throwing off your layout, if that is what is happening.
Jan 12 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Chris Beall | last post: by
14 posts views Thread by Jeff Gillingham | last post: by
2 posts views Thread by chris_culley | last post: by
16 posts views Thread by stevedude | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.