Jump to content

div hyperlink problem


MDanz

Recommended Posts

The width spreads across the whole page, i only want it to be as long as the content in the div.  How can i solve this?

 

<style type="text/css">
.three {
display:block;
width:auto;
height:100px;
position:relative;
border:1px solid black;
}

.three a {
width:100%;
height:100%;
position:absolute;

}

</style>

 

echo "<div class='three'><a href='two'></a>test</div>";

Link to comment
https://forums.phpfreaks.com/topic/243852-div-hyperlink-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.