Reply to Re: Link tags within a container

Your name:

Reply:


Posted by Rob Stampfli on 02/01/75 11:46

In article <doraymeRidThis-955853.08562302052006@news-vip.optusnet.com.au>,
dorayme <doraymeRidThis@optusnet.com.au> wrote:
>In article <ZSt5g.24534$mh.14669@tornado.ohiordc.rr.com>,
> restamp@hotmail.com (Rob Stampfli) wrote:
>
>> In article <44559756$1@quokka.wn.com.au>,
>> ironcorona <iron.corona@gmail.com> wrote:
>> >Rob Stampfli wrote:
>> >> Suppose you have a container of unknown or variable size.
>> >> How would you specify a link tag inside it such that it
>> >> takes up the entire container
>> >
>> >in the css:
>> >
>> >a {display:block; width:100%; height:100%;}
>> >
>> >I only discovered the fun things you can do with the anchor tag, if you
>> >set it to display as a block, a few weeks ago.
>>
>> This doesn't seem to work for me. Take a look at:
>>
>> <http://cboh.org/spantest.html>
>>
>
>Try this:
>
><table><tbody><tr>
><td style="width: 100px;height:100px"> &nbsp;</td>
><td style="width: 200px;">
> <a style="display: block; height:
>100%;padding-top:50%;padding-bottom:50%;"
>href="spantest.html">Hello World</a>
></td>
><td style="width: 100px;">&nbsp;</td>
></tr></tbody></table>
>
>(I just added to your code...)

Thanks for your suggestion. It's getting closer, but if you
look at the results:

<http://cboh.org/spantest2.html>

you'll see adding padding increases the height of the container,
and as the text in the cell increases (folds onto multiple lines),
the height increases even more. The vertical size apparently
becomes 100% of the original container height, plus the height
of the text. Surely there must be a way of expand the <a> tag
vertically without increasing the container height (unless there
is so much text involved that it becomes necessary to do so).

Rob

[Back to original 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

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