|
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"> </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;"> </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]
|