|
-
May 16th, 2008, 09:07 PM
#1
Thread Starter
PowerPoster
[RESOLVED] DIV Positioning Help
I have a container that is centered on the screen and I want to add a few images inside the container at set positions. Using the below seems to work but when I increase the value of left (110px), in Firefox I get a horizontal scroll bar but not in IE6. How can I remove the horizontal scroll bar appearing in Firefox?
css Code:
#container {
margin: 0 auto; /* align for good browsers */
text-align: left; /* counter the body center */
border: 2px solid #666666;
width: 990px;
}
#topleft {
position:relative; left: 110px; top: 0px;
}
html Code:
<div id="container">
<div id="topleft"><img src="images/main.jpg"></div>
</div>
-
May 17th, 2008, 12:40 PM
#2
Re: DIV Positioning Help
Code:
#topleft
{
position:relative; padding-left: 200px;
}
If you're using relative, you don't need left.
-
May 17th, 2008, 12:41 PM
#3
Re: DIV Positioning Help
Actually, it's a set position, so use margin
position:relative; margin-left: 100px;
-
May 17th, 2008, 06:47 PM
#4
Thread Starter
PowerPoster
Re: DIV Positioning Help
Thanks mendhak
-
May 18th, 2008, 06:53 AM
#5
Re: DIV Positioning Help
No prob, add [resolved] please.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|