Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Cascading Style Sheets _ Objects Position Reletive To The Div

Posted by: refreblast Mar 9 2012, 04:40 PM

I am working on a website that is mainly and image, but there is an image rotator thrown in there. I figured out how to have the image center properly but now, the image rotator is off always in the top corner and I cant use "position: absolute" because people have different resolutions. Am I able to make the position absolute within the <div> tag instead of within the page as a whole. Everything within <body> is in one large <div> tag anyway. I am at a loss right now.

I can't include the URL as no one is suppose to see the website before it is released.

Posted by: Christian J Mar 9 2012, 04:44 PM

QUOTE(refreblast @ Mar 9 2012, 10:40 PM) *

I cant use "position: absolute" because people have different resolutions.

You might be able to with percent units.

QUOTE
Am I able to make the position absolute within the <div> tag instead of within the page as a whole.

Yes, if you make the DIV "position: relative".

Posted by: refreblast Mar 9 2012, 04:50 PM

QUOTE(Christian J @ Mar 9 2012, 04:44 PM) *

QUOTE(refreblast @ Mar 9 2012, 10:40 PM) *

I cant use "position: absolute" because people have different resolutions.

You might be able to with percent units.

QUOTE
Am I able to make the position absolute within the <div> tag instead of within the page as a whole.

Yes, if you make the DIV "position: relative".


I tried that and it did not work. I set the #page div as position:relative and I set its height and width to that of the image that occupies it, and it did not effect the position of the image rotator

Posted by: pandy Mar 9 2012, 05:24 PM

So did you position the image rotator and is it inside #page?

Can you post the URL to a sample page with what you've got so far, use a temp URL? That would make things a lot easier.

Posted by: refreblast Mar 11 2012, 02:01 PM



There is the code. I cant post the URL because my webhost is down at the moment and I am unaware of when it will be back up.

Posted by: pandy Mar 11 2012, 06:11 PM

Nothing is positioned relative here. If it's in the linked style sheet we can't see it. Neither can we see what the scripts do.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)