473,412 Members | 1,873 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,412 software developers and data experts.

Block links, width/height problems

I have this under-construction page, If you try and select the link coming from the bottom with your mouse, you'll notice, that before the actual link is selected, the td background will change. you have to the select the text itself to make the link select. I don't know If I've explained it well... I tried height:100%, and width:100%; in the a:link area in the css... Tried margin-bottom:0, and none of it makes the "link area" spread out to the entire td. Hope someone knows what I'm trying to say... Here's the page..

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <style type="text/css">
  3. body {cursor:url(http://www.angelfire.com/mn3/magnesium/wagtail.ani);
  4.       border:1 solid gray;
  5.       margin-left:2px;
  6.       margin-right:2px;
  7.       margin-top:2px;}
  8. a:link {text-decoration:none;
  9.         font-family:arial;
  10.         type:block;
  11.         width:100%;
  12.         height:100%;
  13.         letter-spacing:2;
  14.         color:gray;}
  15. a:selected {text-decoration:none;
  16.             color:white;}
  17. a:visited {text-decoration:none;
  18.            color:gray;}
  19. a:hover {text-decoration:none;
  20.          color:white;}
  21. </style>
  22. <body bgcolor="#282828" text="gray">
  23. <div id="sidebar_menu">
  24. <table border="0" cellspacing="1" cellpadding="1" bgcolor="#4444aa" width="200"><tr><td bgcolor="black">
  25. <table border="0" cellspacing="2" cellpadding="3" bgcolor="#7777dd" width="100%"><tr><td align="center" valign="middle" bgcolor="#171717" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg">
  26. <font size="2" face="arial" color="white" style="letter-spacing:5;"><b>Steve's Spot</b></font>
  27. <table border="0" cellspacing="1" cellpadding="0" bgcolor="#4444aa" width="75%" height="1"><tr><td bgcolor="#282828" style="overflow:hidden;"></td></tr></table>
  28. <font size="1" face="arial" color="gray" style="letter-spacing:2;"><u>&nbsp;M e n u&nbsp;</u></font>
  29. </td></tr></table>
  30. </td></tr>
  31. <tr><td bgcolor="black">
  32. <table border="0" cellspacing="0" cellpadding="2" bgcolor="#7777dd" width="100%"><tr><td align="left" valign="middle">
  33.  
  34. <table border="0" cellspacing="0" cellpadding="2" bgcolor="black" width="100%"><tr><td align="center" valign="middle" width="15%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg"><font color="white" size="3" face="arial"><b>►</b></font></td><td align="left" valign="middle" bgcolor="#282828" width="85%" background="http://www.angelfire.com/mn3/magnesium/buttonbg2.jpg"><font size="2" face="arial" color="white" style="letter-spacing:2;"><b>&nbsp;Home</b></font></td></tr></table>
  35. </td></tr></table>
  36.  
  37. </td></tr>
  38.  
  39. <tr><td bgcolor="black">
  40. <table border="0" cellspacing="2" cellpadding="0" bgcolor="#7777dd" width="100%"><tr><td align="left" valign="middle">
  41. <table border="0" cellspacing="0" cellpadding="2" bgcolor="black" width="100%"><tr><td align="center" valign="middle" width="15%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg"><font color="#9999ff" size="3" face="arial"><b>☻</b></font></td><td align="left" valign="middle" bgcolor="#282828" width="85%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg" onMouseover="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg2.jpg';" onMouseout="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg.jpg';">
  42. <a href="http://"><font size="2"><b>&nbsp;About Me</b></font></a></td></tr></table>
  43. </td></tr></table>
  44.  
  45. </td></tr>
  46.  
  47. <tr><td bgcolor="black">
  48. <table border="0" cellspacing="2" cellpadding="0" bgcolor="#7777dd" width="100%"><tr><td align="left" valign="middle">
  49. <table border="0" cellspacing="0" cellpadding="2" bgcolor="black" width="100%"><tr><td align="center" valign="middle" width="15%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg"><font color="#9999ff" size="3" face="arial"><b>&fnof;</b></font></td><td align="left" valign="middle" bgcolor="#282828" width="85%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg" onMouseover="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg2.jpg';" onMouseout="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg.jpg';">
  50. <a href="http://"><font size="2"><b>&nbsp;My Facebook</b></font></a></td></tr></table>
  51. </td></tr></table>
  52.  
  53. </td></tr></table>
  54. </td></tr></table>
  55. </div>
  56. </body>
  57. </html>
Nov 18 '09 #1
10 5407
drhowarddrfine
7,435 Expert 4TB
In your css for 'a:link' add 'display:block'.

I have to say you need to bring your markup up to date. Most of that was deprecated 10 years ago.
Nov 18 '09 #2
haha, I know I know... I learned my HTML about 10 years ago.. Teachers ain't free so I downloaded all browsers and as long as it all looks and functions well on the important ones I don't mess with it.. Thank you tho, I'll try and see what happens
Nov 18 '09 #3
ok, tried display:block in the a:link, and no difference from type:block :/ ... I'm trying to get it to stretch out.. You can still go above and below the link the the text "un-highlights" but the <td's> mouseover is still activated. I'm beginning to think I'm gonna have to live with it.
Nov 18 '09 #4
drhowarddrfine
7,435 Expert 4TB
But it does work. I didn't notice you put 'type:block'. There is no such thing. Remove that and see what happens including, of course, display:block. If it still doesn't work, which browser are you testing in?
Nov 18 '09 #5
Like I said, I had type:block, and it worked in IE and google, but won't completely stretch to the whole TD... I removed it and corrected it with the display:block... same thing. There's a sort of an invisible non-<a> border around the link. Can I add padding in the link? I just want the whole <td> to be clickable for the link. possibly the cellpadding from the table itself is doing it?? I'm using IE strictly, then I go to Google Chrome and Firefox to see how it looks.. and if it's okay, I leave the coding and edit it enough to where I want it on each browser. I'm real picky about fancy fast-loading effects. But "I" want to make them if you know what I mean. I like to think I have a certain easy-going style.
Nov 18 '09 #6
drhowarddrfine
7,435 Expert 4TB
Then it is working better, just not as good as you want.
Nov 18 '09 #7
drhowarddrfine
7,435 Expert 4TB
@magnesium
Never, ever do that. IE is, by far, the worst browser on the planet. Always, always use a modern, standards compliant browser such as .... anything but IE. Once you know your markup is correct, THEN and only then look at it to see if/when IE screws it up. But the quirks and bugs in IE are well known as are the hacks to fix it.
Nov 18 '09 #8
drhowarddrfine
7,435 Expert 4TB
It's working as it should in Firefox, Chrome, Safari and Opera. I don't have IE available right now to check there. It looks like the link works all the way up to the border of the td except where the graphic is on the left side. Are you saying you want the graphic to be clickable, too?
Nov 18 '09 #9
Yea, the link are is clickable to the top, but it's not like centered in a block, you go below the link text, and the link is no longer "hovered".. just the TD ... I haven't worked on it in a couple days so I haven't had a chance to see if it's a cellpadding prob. The left images are only lil fancy pics, ya know.. not supposed to be clickable. I like IE's un-judging looks unto my shoddy coding, lol
Nov 20 '09 #10
Okay, figured out my problem... I had cellpadding in the link's <td> which yes.. It was a PART of the the problem. The other problem is, in the left 'ASCII-text-piclettes' the font size was 4. The link's font sizes are 3. So I changed it, deleted all the extra crap, and BAM! there we go. Not the font size I wanted but you press Ctrl+a on the doc and the entire TD the link is in gets selected showing that the whole thing is clickable *:D ... Here's the solved version:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <style type="text/css">
  3. body {cursor:url(http://www.angelfire.com/mn3/magnesium/wagtail.ani);
  4.       border:1 solid gray;
  5.       margin-left:2px;
  6.       margin-right:2px;
  7.       margin-top:2px;}
  8. a:link {text-decoration:none;
  9.         font-family:arial;
  10.         display:block;
  11.         letter-spacing:2;
  12.         color:gray;}
  13. a:selected {text-decoration:none;
  14.             color:white;}
  15. a:visited {text-decoration:none;
  16.            color:gray;}
  17. a:hover {text-decoration:none;
  18.          color:white;}
  19. </style>
  20. <body bgcolor="#282828" text="gray">
  21. <div id="sidebar_menu">
  22. <table border="0" cellspacing="1" cellpadding="1" bgcolor="#4444aa" width="200"><tr><td bgcolor="black">
  23. <table border="0" cellspacing="2" cellpadding="3" bgcolor="#7777dd" width="100%" height="100"><tr><td align="center" valign="middle" bgcolor="#171717" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg">
  24. <font size="3" face="arial" color="white" style="letter-spacing:5;"><b>Steve's Spot</b></font>
  25. <table border="0" cellspacing="1" cellpadding="0" bgcolor="#4444aa" width="75%" height="2"><tr><td bgcolor="#282828" style="overflow:hidden;"></td></tr></table>
  26. <font size="1" face="arial" color="gray" style="letter-spacing:2;"><u>&nbsp;M e n u&nbsp;</u></font>
  27. </td></tr></table>
  28. </td></tr>
  29. <tr><td bgcolor="black">
  30. <table border="0" cellspacing="0" cellpadding="2" bgcolor="#7777dd" width="100%"><tr><td align="left" valign="middle">
  31.  
  32. <table border="0" cellspacing="0" cellpadding="2" bgcolor="black" width="100%"><tr><td align="center" valign="middle" width="15%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg"><font color="white" size="3" face="arial"><b>►</b></font></td><td align="left" valign="middle" bgcolor="#282828" width="85%" background="http://www.angelfire.com/mn3/magnesium/buttonbg2.jpg"><font size="3" face="arial" color="white" style="letter-spacing:2;"><b>&nbsp;Home</b></font></td></tr></table>
  33. </td></tr></table>
  34.  
  35. </td></tr>
  36.  
  37. <tr><td bgcolor="black">
  38. <table border="0" cellspacing="2" cellpadding="0" bgcolor="#7777dd" width="100%"><tr><td align="left" valign="middle">
  39. <table border="0" cellspacing="0" cellpadding="0" bgcolor="black" width="100%"><tr><td align="center" valign="middle" width="15%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg"><font color="#9999ff" size="3" face="arial"><b>☻</b></font></td><td align="left" valign="middle" bgcolor="#282828" width="85%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg" onMouseover="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg2.jpg';" onMouseout="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg.jpg';">
  40. <a href="http://"><font size="3"><b>&nbsp;About Me</b></font></a></td></tr></table>
  41. </td></tr></table>
  42.  
  43. </td></tr>
  44.  
  45. <tr><td bgcolor="black">
  46. <table border="0" cellspacing="2" cellpadding="0" bgcolor="#7777dd" width="100%"><tr><td align="left" valign="middle">
  47. <table border="0" cellspacing="0" cellpadding="0" bgcolor="black" width="100%"><tr><td align="center" valign="middle" width="15%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg"><font color="#9999ff" size="3" face="arial"><b>&fnof;</b></font></td><td align="left" valign="middle" bgcolor="#282828" width="85%" background="http://www.angelfire.com/mn3/magnesium/buttonbg.jpg" onMouseover="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg2.jpg';" onMouseout="this.background='http://www.angelfire.com/mn3/magnesium/buttonbg.jpg';">
  48. <a href="http://"><font size="3"><b>&nbsp;My Facebook</b></font></a></td></tr></table>
  49. </td></tr></table>
  50.  
  51. </td></tr></table>
  52. </td></tr></table>
  53. </div>
  54. </body>
  55. </html>
Nov 20 '09 #11

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

Similar topics

7
by: Jeff Thies | last post by:
I'm trying to do a nav list using list items. Roughly this is putting links styled display: block and with a background color. In IE5 (windows, haven't tried Mac yet), adding the display:...
2
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the...
2
by: ruby_bestcoder | last post by:
Hi Im having problem in firefox with display:none/block. I have essentially 3 li elements. In each element there are a few nested div:s. Clicking on one of the divs, makes another div to...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
5
by: CES | last post by:
All, I was hoping that someone might be able to help me with a few questions on Aligning Block Elements properly... Basically I have a row that has a fixed width of 900px. Within the row their is...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
2
by: Jukka K. Korpela | last post by:
Sub titulo "Re: DIV borders different in IE7 when in td" scripsit Ben C: This seems to be the heart of the matter, and I'm trying to get a real discussion started, by moving the discussion to...
7
by: GTalbot | last post by:
Hello fellow authoring.stylesheets colleagues, Can someone please explain why the bottom margin of the last inflow block-level child in an overflowed parent should not have its margin reachable....
12
by: Keith G Hicks | last post by:
I have a client that I wrote an MS Access app for quite a few years ago where they need to know the height in inches of a block of text for billing their customers. The MS Access app opens Word in...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.