2uzhan.com
Advertisement
Now Place:2uzhan.com » div hyperlink problem

div hyperlink problem

UI / UX Design @ August 5, 2011   Views:0

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

--------------Solutions-------------

Remove position:absolute

tried that and it doesn't work.

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

}

The question to ask here is: 100% of what? The answer: The browser window. Give .three a set width.

Regards
Arkinder

On my page (http://www.50allstars.com/2017/10/test.html) I'm attempting to align some divs, but the middle div shifts downward whenever I view it on mobile. I've tried adjusting widths, maybe it has something ...

Hi,
I need to import a video file into an audio editor called Steinberg Nuenbdo. (on daily basis). In Nuendo, best format for video is avi. But my video converter ...

Hi Everyone,

I am having a strange problem on my webpage. I am getting this Black shade whenever i type or focus my cursor on a select or text field. ...

Tags:web-design
© 2018 2uzhan.com Contact