Anchor HTML DIV tag to right of screen

Posted by Phillip on Stack Overflow See other posts from Stack Overflow or by Phillip
Published on 2010-04-11T15:08:59Z Indexed on 2010/04/11 15:13 UTC
Read the original article Hit count: 297

Filed under:
|
|
|

Hello,

I have a site that has 2 DIV tags, one floats left the other floats right. The left DIV contains text for the page, the other DIV is used to display a video.

When I have text in the left DIV that fits the entire width of the screen the video shows up where I want it. However, a few pages have very little text and cause the video to show up in the right-center of the screen. I want to anchor this DIV to the right of the screen regardless of how much text is shown. I don't seem to get this problem in lower resolutions, it occurs more in the higher resolutions (such as 1280x1024). You can see an example on these pages:

http://www.quilnet.com/TechSupport.aspx - Positions the right DIV where I want it regardless of the resolution.

http://www.quilnet.com/ContactUs.aspx - Makes the right DIV closer to the center in higher resolutions. I want it in the position of the page TechSupport.aspx.

I am trying to refrain from using the width parameter because I want it to be resolutionally compliant. I don't want my viewers to have to move a scroll bar left and right.

Any ideas?

Thanks!

© Stack Overflow or respective owner

Related posts about div-layouts

Related posts about html