473,399 Members | 3,888 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,399 software developers and data experts.

How's hyperlink overlap a image and located at bottom right corner of table cell.

Hi, I'm encounter a problem here. I hope somebody able helping me.
i'm put a "log out" hyperlink overlap a image and that particular image is inside a table cell. I also try align the hyperlink on bottom and right at the cell but the problem is occur.

If i set position as absolute then the image and hyperlink will leak out from table. If without the position setting then hyperlink is not overlap the image. Any suggestion?

This is my HTML code
Expand|Select|Wrap|Line Numbers
  1. <TABLE cellSpacing="0" cellPadding="0" width=100% border="1">
  2.     <TBODY>
  3.     <tr height="31">
  4.         <TD width="153"><IMG src="files/a1.gif" height="31" style="display:block;"></TD>
  5.         <TD width="309"><IMG src="files/a2.gif" height="31" style="display:block;"></TD>
  6.         <TD width="146"><IMG src="files/a3.gif" height="31" style="display:block;"></TD>
  7.         <TD><IMG src="files/a4.gif" width=100% height="31" style="display:block;"></TD>
  8.         <TD width="110"><IMG src="files/a4.gif" height="31" style="display:block;"></TD>
  9.     </tr>
  10.     <tr>
  11.         <TD><IMG src="files/b1.gif" style="display:block;"></TD>
  12.         <TD><IMG src="files/b2.gif" style="display:block;"></TD>
  13.         <TD><IMG src="files/b3.gif" style="display:block;"></TD>
  14.         <TD><IMG src="files/b4.gif" width=100% height="48" style="display:block;"></TD>
  15.         <TD style="text-align: right; vertical-align: bottom;">
  16.         <a href="" style="display:block; position: absolute; z-index:2;">Log Out</a>
  17.         <IMG src="files/b5.gif" style="display:block;">
  18.         </TD>
  19.     </tr>
  20.     </TBODY>
  21. </TABLE>
  22.  
May 27 '09 #1
8 4442
prabirchoudhury
162 100+
try this block with logout link and image .. put both in a <div>


Expand|Select|Wrap|Line Numbers
  1.  
  2. <div style="background: url(files/b4.gif) no-repeat; float: right;">
  3.             <a href="" style="display:block; ">Log Out</a>
  4.            </div>
  5.  
May 27 '09 #2
omerbutt
638 512MB
@webster5u
hi webster
try using this
Expand|Select|Wrap|Line Numbers
  1. <TABLE cellSpacing="0" cellPadding="0" width=100% border="1">
  2.      <TBODY>
  3.      <tr height="31">
  4.          <TD width="153"><IMG src="files/a1.gif" height="31" style="display:block;"></TD>
  5.          <TD width="309"><IMG src="files/a2.gif" height="31" style="display:block;"></TD>
  6.          <TD width="146"><IMG src="files/a3.gif" height="31" style="display:block;"></TD>
  7.          <TD><IMG src="files/a4.gif" width=100% height="31" style="display:block;"></TD>
  8.          <TD width="110"><IMG src="files/a4.gif" height="31" style="display:block;"></TD>
  9.      </tr>
  10.      <tr>
  11.          <TD><IMG src="files/b1.gif" style="display:block;"></TD>
  12.          <TD><IMG src="files/b2.gif" style="display:block;"></TD>
  13.          <TD><IMG src="files/b3.gif" style="display:block;"></TD>
  14.          <TD><IMG src="files/b4.gif" width=100% height="48" style="display:block;"></TD>
  15.          <TD align="center" valign="middle" style="background-image:url(../ajaxpaging/loading.gif); background-repeat:no-repeat; background-position:center;">
  16.          <a href="filename.php">Log Out</a>
  17.          </TD>
  18.      </tr>
  19.      </TBODY>
  20.  </TABLE>
  21.  
May 27 '09 #3
prabirchoudhury
162 100+
still that not gonna work .. did you test this script ? but it is not working for me in any browser.
May 28 '09 #4
omerbutt
638 512MB
@prabirchoudhury
its working in all browasers IE and Mozilla specially
May 28 '09 #5
Sorry for late reply. I'm busy for the other code yesterday.

Thank for your sharing, I get your idea.
Both of your trying change the background image instead image tag. The script apply in TABLE TD is fine but if it apply in DIV then it bring along idle space between TD and DIV.

Expand|Select|Wrap|Line Numbers
  1.             <TD style="background: url(WEB_CONTEXT/images/b5.gif) no-repeat center; 
  2.                 text-align:center; vertical-align: bottom;">
  3.                   <a href="/webdev/mis/auth/logout.jsp">Log Out</a>
  4.             </TD>
  5.  
May 29 '09 #6
omerbutt
638 512MB
@webster5u
sory if i am not getting you but are you trying to replace a td with a div , you have to place the div inside the td , if i am wrong please do explain a lil bit between which td and div there is alot of space
reagrds,
omer aslam
May 29 '09 #7
I change TD background image instead of DIV. It is work fine now.

If it is put background image in DIV tag then background image will only covers the DIV tag and TD is show in white. As below illustrate

<TD>
wwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwww
wwwwwww<DIV>bbb</DIV>
wwwwwwwwwwwwwwwwww
</TD>

p/s: w is white and b is blue from image.
May 29 '09 #8
omerbutt
638 512MB
hi
look here and which doc type are you using and try assigning same width to both TD nad Div
link
May 29 '09 #9

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

Similar topics

2
by: zwylle | last post by:
Hi all, to avoid a nervous breakdown I finally decided to seek help :D I have a table defined with plain color background and in some cells I show pictures to frame my site. The problem I...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
4
by: Ester | last post by:
I have an interior design of a living room with lights and aircond image. My task is to load the living room image without any light and aircond images as background image of a WebForm after that I...
4
by: timmy | last post by:
I have a table with a cell on the bottom right with an image to create a rounded corner effect: <table cellpadding="0" cellspacing="0" border="1"> <tr><td rowspan="2">asdfsadf</td> <td...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
1
by: Hardy Wang | last post by:
Hi, I found a piece of code to add drop shadow to a photo like below, after I save the image, it is actually a BMP file even though I specify a JPG file extension (see...
7
by: ridergroov | last post by:
Hi folks. I'm trying to figure out how I can insert 2 different graphics into a table cell and align one to the top and one to the bottom using CSS. I used the "vertical align" to "top" in DW but...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.