Results 1 to 5 of 5

Thread: [RESOLVED] DIV Positioning Help

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Resolved [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:
    1. #container {
    2.     margin: 0 auto;   /* align for good browsers */
    3.     text-align: left; /* counter the body center */
    4.     border: 2px solid #666666;
    5.     width: 990px;
    6. }
    7.  
    8. #topleft {
    9.  
    10. position:relative; left: 110px; top: 0px;
    11. }

    html Code:
    1. <div id="container">
    2.  
    3.         <div id="topleft"><img src="images/main.jpg"></div>
    4.            
    5.     </div>

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: DIV Positioning Help

    Code:
    #topleft 
    {
    
    position:relative; padding-left: 200px;
    }
    If you're using relative, you don't need left.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: DIV Positioning Help

    Actually, it's a set position, so use margin

    position:relative; margin-left: 100px;

  4. #4

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Resolved Re: DIV Positioning Help

    Thanks mendhak

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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
  •  



Click Here to Expand Forum to Full Width