473,320 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Text over an Image with hyperlink

52
I have an image and a span inside a hyperlink that I need to appear on top of one another. Can anyone tell me why, when I use relative positioning on my span it causes the text to move to the correct spot but the line from the hyperlink stays at it's original position?

Here is the code in question...
Expand|Select|Wrap|Line Numbers
  1. <div class="menuBarStyle">
  2.     <a href="projects.aspx" onmouseover="buttonOver('projectButton', '../images /AlienDa3Over.gif')" onmouseout="buttonOver('projectButton', '../images/AlienDa3.gif')">
  3.      <img name="projectButton" src="http://bytes.com/submit/images/AlienDa3.gif" class="projectButtonStyle" alt="Projects"  />
  4.     <span class="projectLabelStyle">Projects</span>
  5.     </a>
  6.     </div>
and these are the styles used...

Expand|Select|Wrap|Line Numbers
  1. .menuBarStyle{
  2.     height:50px;
  3. }
  4.  
  5. .projectButtonStyle{
  6.     position:absolute;
  7.     left:370px;
  8. }
  9.  
  10. .projectLabelStyle
  11. {
  12.     position:relative;
  13.     z-index:1;
  14.     left:380px;
  15.     top:5px;
  16.     color:#999999
  17. }
annnd here's the page on my site...

My Site
Aug 10 '09 #1
1 4317
drhowarddrfine
7,435 Expert 4TB
Because the anchor is not the span. You relocated the span but that is not the anchor and it's the anchor that gets underlined.
Aug 10 '09 #2

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

Similar topics

1
by: Neil Woodvine | last post by:
***Scenario ... I have a DataList with a hyperlink WebControl in the Item Template. I want to display a 64x64 image in the Hyperlink and set the NavigateURL to the full size image. ***Source...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
14
by: Rudy | last post by:
Hello all! I been trying to get a handle with Images. I have learned alot from the fine people here. So, I also learned that thumbnail images look terrible taken from a digital cam. I know why...
10
by: Safalra | last post by:
When a poster in a forum I frequent said they were beginning to learn HTML, I thought I should direct them to a good HTML tutorial so that they wouldn't start using <blink> and the like....
8
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a...
8
by: Woodchuck | last post by:
Hi:) I've been trying to position some element's on my page and I can't come up with a way to equally position 4 DIV's in another DIV without explicitly setting the width of the "child" DIV's....
1
by: JB | last post by:
I have a set of links that are currently images that when the person rolls over them, they change color. Essentially the image is a box where the background is brown and the text is blue. When the...
3
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the HyperLink control. My image is large, so I am setting the width/height attributes, but when it renders the width/height attributes are in the <atag rather...
4
by: alun65 | last post by:
I'm attempting to programmatically build up some HTML in the code behind. Like so: // Create Hyperlink HyperLink link = new HyperLink(); link.NavigateUrl = "nice cat"; link.Text = "Cats...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.