Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    white space issue on right hand side can't get rid of it.

    hi guys
    having a very frustrating problem currently building a new front page for an existing website, and having a strange problem there seems to be an extr bit of white space appearing on the right hand side inside my divs. have attached a picture of what it looks like in dreamweaver and the code is below.
    any help appreciated.
    thanks

    white space issue on right hand side can't get rid of it.-screen-shot-2012-11-07-15.09.06.jpg

    Code:
    <body>
    <div style="width:100%; margin:auto auto;">
    	<div style=" display:block; overflow-x:hidden;">
    	<img src="images/chillis.jpg" width="23%" style="padding:5px 5px; display: inline; margin-left:auto;border:0;" />
    	<img src="images/eggs.jpg" width="23%" style="padding:5px 5px;display: inline;border:0;" />
    	<img src="images/grapes.jpg" width="23%" style="padding:5px 5px;display: inline;border:0;" />
    	<img src="images/ham.jpg" width="23%" style="padding:5px 5px;display: inline;border:0;" />
    	</div>
    	<div style=" display:block; overflow-x:hidden; ">
    	<img src="images/rasp.jpg" width="23%" style="padding:5px 5px;display: inline; margin-left:auto; border:0;" />
    	<img src="images/logo2.jpg" width="46%" style="padding: 5px 10px;display: inline; border:0; " />
    	<img src="images/IMG_2740.jpg" width="23%" style="padding: 5px 5px; align:right; margin:0 0 0 3px; display: inline;border:0;" />
    	</div>
    	<div style="display:block; overflow-x:hidden;">
    	<img src="images/chillis.jpg" width="23%" style="padding:5px 5px; display: inline; margin-left:auto;border:0;" />
    	<img src="images/eggs.jpg" width="23%" style="padding:5px 5px;display: inline;border:0;" />
    	<img src="images/grapes.jpg" width="23%" style="padding:5px 5px;display: inline;border:0;" />
    	<img src="images/ham.jpg" width="23%" style="padding:5px 5px;display: inline; border:0;" />
    	</div>
    </div>

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,744
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello ditchweed,
    Mixing % widths with px padding is never going to work very well.
    As an example, your first div has 4 images in it each 23% wide with 5px of padding around it...that adds up to 92% PLUS 40px in padding.

    92% plus 40px = ???
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Nov 2012
    Location
    USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    We have the same problem actually, I'm really having a hard time figuring out!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •