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 Coder
    Join Date
    Apr 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Background img Goes crazy on window/text resize?

    Hi

    I got this page looking nice with the smallest font and a full size window in IE. But…when I resize the text or the window my sidebar div seems to go to an opaque background (it has no background declared) which hides the background declared in the wrapper. And the background image also appears over by clearing div (right above the footer). So I think the problem may be with my clearing Div? When I set the background color and take off the background image, things work great.

    ***I had a lot of problems getting this layout so if anyone has a better way please help. Since I was trying to get an x repeated background under the sidebar, and the y repeated background in the content window (the page shadow) none of the 2/3column layouts I could find worked. And I guess this one does not really work either.

    All the code is here:
    http://www.emglab.com/newlayout/

    The main containers are like:
    Body
    1 header (absolute)
    2 wrapper (padded down)
    A. side (float left)
    B. content
    3 footer

    The code:
    Code:
    html, body {
    	font:80% Verdana,Tahoma,Arial,sans-serif;
    	margin: 0;
    	border: 0;
    	padding: 0;
    	background-color: white;
    }
    	
    #header {
    	position: absolute;
    	top: 0px,
    	left: 0px;
    	width: 100%;
    }
    
    #wrapper {
    	border: 0;
    	padding: 0;
    	margin: 100px 0 0 0;
    	background: #cc9966 url("gradiant.gif") repeat-x;
    }
    
    #side {
    	padding: 2em 0 0 0;
    	margin: 0;
    	border: 0;
    	width: 80px;
    	float: left;
    	height: 100%;
    	text-align: center;
    }
    
    #content {
    	padding: 4em 25px 25px 25px;
    	margin: 0;
    	border: 0;
    	background: white url("shadow.gif");
    	background-repeat: repeat-y;
    	background-position: left;
    	height:100%;
    	line-height:1.2em;
    	float:left;
    }
    
    #footer {
    	clear: both;
    	bottom: 0px;
    	left: 0px;
    	height: 10px;
    	background: white;
    	width: 100%;
    }
    
    .clear {
    	clear:both;
    	border: 0px;
    	padding: 0;
    	margin: 0;
    	height: 1px;
    	background: white;
    }
    Thanks for any help.
    -Aj

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,672
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello amandajo,
    I worked on your Motion Lab site a bit, hope that's alright. I changed quite a bit in both the css and markup, some things just needed moved around a little. I think it works a little better.

    Have a look at it here.

    I know, I messed up the left bottom corner... I would just photoshop some color onto the outside edg of that gif, would be easiest that way.
    That gap between #wrap and #footer must be from the text in the footer? I didn't mess with anything that far down the page.

    At least seems to resize pretty well now.

    Validator still shows a few errors to fix.
    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 Coder
    Join Date
    Apr 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks but

    Thank you very much.
    But the main problem still exist

    You added

    Code:
    #gradient {
    	height: 100%;
    	background: #cc9966 url("gradiant.gif") repeat-y;
    }
    Where I had:
    Code:
    #wrapper {
    	border: 0;
    	padding: 0;
    	margin: 100px 0 0 0;
    	background: #cc9966 url("gradiant.gif") repeat-x;
    }
    So you told the file to repeat the background in the wrong direction, when you change yours to repeat x (so the gradiant shows up), it stops at the bottom of your container... not at the footer.


  •  

    Posting Permissions

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