PDA

View Full Version : Need help with DIVs please :(



Pawf
16-01-2007, 07:31 PM
Ok, I get the below problem:

http://www.ian559.pwp.blueyonder.co.uk/smiffla/burd/huh/wha.png

Here is a link to the page:

http://www.ian559.pwp.blueyonder.co.uk/smiffla/burd/huh/home.html

and the CSS:

http://www.ian559.pwp.blueyonder.co.uk/smiffla/burd/huh/css.css

Any ideas?

ScottDiamond
16-01-2007, 07:35 PM
Is it coded in CSS and Divs or Tables and Divs?

Pawf
16-01-2007, 07:39 PM
CSS and DIVs. The section of CSS it is is:
div.middle { width: 790px; background-image: url('images/content.png'); background-position: top left; background-repeat: repeat-y; margin: 0px; padding-right: 15px; padding-left: 15px; }

YouFail
16-01-2007, 07:58 PM
div.middle { width: 780px; background-image: url('images/content.png'); background-position: top left; background-repeat: repeat-y; margin: 0px; padding-right: 25px; padding-left: 15px; }

Should work :)

Mentor
16-01-2007, 08:07 PM
Well your middle div class is streatching the layout.
Basicly its becuse your redefining the divs actual size as 790, when the div will auto fit a gap. Since your useing a padding, the rendering gets a bit odd, becuse, the text formats as if it has 790px of room, but the padding the moves this text 15px to the right in accordance with the padding, so now the text goes over the edge, then applys the 15px the other side, but rather than resizeing the text format sits a 790px long regaudless of the room.

I think just removeing the width:790px from the middle class should fix the problem though :p

YouFail
16-01-2007, 08:08 PM
Well your middle div class is streatching the layout.
Basicly its becuse your redefining the divs actual size as 790, when the div will auto fit a gap. Since your useing a padding, the rendering gets a bit odd, becuse, the text formats as if it has 790px of room, but the padding the moves this text 15px to the right in accordance with the padding, so now the text goes over the edge, then applys the 15px the other side, but rather than resizeing the text format sits a 790px long regaudless of the room.

I think just removeing the width:790px from the middle class should fix the problem though :p

Wouldn't removing the width make it a fluid layout? If people dont understand what fluid means it means that it'll expand side ways...

Mentor
16-01-2007, 08:12 PM
Wouldn't removing the width make it a fluid layout? If people dont understand what fluid means it means that it'll expand side ways...
Naa, the container div will maintain the correct sizeing

YouFail
16-01-2007, 08:15 PM
Oh. Totally forgot about the container. Silly fool. :P

Pawf
16-01-2007, 09:01 PM
Wehay! Worked a treat. Thanks a lot to all of you +rep :) Edit: Sorry guys, says I have to spread before giving it to either of you :S:S

Want to hide these adverts? Register an account for free!