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 12-08-2006, 04:26 AM   PM User | #1
amandajo
New Coder

 
Join Date: Apr 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
amandajo has a little shameless behaviour in the past
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
amandajo is offline   Reply With Quote
Old 12-08-2006, 11:44 AM   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 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
Excavator is offline   Reply With Quote
Old 12-08-2006, 03:56 PM   PM User | #3
amandajo
New Coder

 
Join Date: Apr 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
amandajo has a little shameless behaviour in the past
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.
amandajo 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 11:49 AM.


Advertisement
Log in to turn off these ads.