You are here: Re: Hyperlink for entire table cell rather then just the text - how is it done? « HTML « IT news, forums, messages
Re: Hyperlink for entire table cell rather then just the text - how is it done?

Posted by David Smithz on 12/10/06 17:02

"BootNic" <BootNic@bounce.prodigy.net> wrote in message
> To treat a link as a block element, just declare it with CSS.
[snip]

Thanks for the code listing which I tried out. Unfortunately it still does
not actually achieve what I'm after.

I took your code and run it and it was what I wanted except for the fact
that the text in the boxes was not bottom right aligned as I wanted.
Previous research has showed me that the only way I can achieve this is by
using a table as the vertical-align style property does not have an effect.

I took your code and amended it by adding the table so that I could position
the text and I get exactly the same problem that I was originally reporting.
Maybe I am approaching the problem of vertically positioning the text in the
wrong way but I do not know of another one.

try the code below to see what I mean:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css">
a.blocka, a.blocka:link {
background-color: rgb(255, 255, 224);
color: rgb(0, 128, 0);
display: block;
margin: auto;
padding: 0.3em;
text-decoration: none;
width: 10em;
text-align:right;
height:20em;
vertical-align:text-bottom;
}
a.blocka:visited {
background-color: rgb(15, 0, 15);
color: rgb(240, 255, 240);
}
a.blocka:hover {
background-color: rgb(173, 216, 230);
color: rgb(255, 0, 0);
text-decoration: underline;
}
a.blocka:active,
a.blocka:focus {
background-color: rgb(255, 90, 0);
color: rgb(255, 215, 0);
}
</style>
</head>
<body>
<div>
<a class="blocka" href="./index2.php"><table height="100%" > <tr><td
valign="bottom" align="right">Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Donec nibh. Integer velit ligula,
faucibus eu, consequat non, molestie nec, orci. Vestibulum
varius, dui sit amet.> </td></tr></table></a>
</div>
</body>
</html>

Thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация