Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-07-2012, 04:20 PM   PM User | #1
ditchweed
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
ditchweed is an unknown quantity at this point
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

Click image for larger version

Name:	Screen Shot 2012-11-07 at 15.09.06.jpg
Views:	87
Size:	54.5 KB
ID:	11690

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>
ditchweed is offline   Reply With Quote
Old 11-07-2012, 05:35 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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
Excavator is offline   Reply With Quote
Old 11-08-2012, 06:50 AM   PM User | #3
jimmybuss
New to the CF scene

 
Join Date: Nov 2012
Location: USA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jimmybuss is an unknown quantity at this point
We have the same problem actually, I'm really having a hard time figuring out!
jimmybuss is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:16 AM.


Advertisement
Log in to turn off these ads.