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

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 09-15-2009, 02:00 AM   PM User | #1
PonchoX
New Coder

 
Join Date: Apr 2009
Location: Newport Beach, California
Posts: 56
Thanks: 6
Thanked 0 Times in 0 Posts
PonchoX is an unknown quantity at this point
Body background showing up where it shouldn't

Hi.

Can one of you wizards tell me why this page:

http://radified.com/index.rad

.. has a little bit of the background graphic showing up at the top and bottom of the center "mainContent" div (which I named "radEntries").

I'm normally pretty good with CSS but can't figure out this one.

It's easier to see at the bottom of the page .. where the "mainContent" div meets the footer. Harder to see at the top where it meets the header.

Thanks.

Last edited by PonchoX; 09-15-2009 at 02:40 AM..
PonchoX is offline   Reply With Quote
Old 09-15-2009, 02:45 AM   PM User | #2
Fisher
Regular Coder

 
Join Date: Jan 2009
Posts: 316
Thanks: 7
Thanked 92 Times in 91 Posts
Fisher is on a distinguished road
First, you need to remove the <br> tag from the bottom:
Code:
<br class="clearFloat" />
Then add:
Code:
.validator {margin:0}
to your CSS. This will fix the bottom part.

You'll have to similarly remove margin or padding from the offending part at the top.

You could have avoided this by starting your CSS (always!) with *{margin:0;padding:0;}, but if you do it now you'd be in for a shock at the effect it has on your page.
Fisher is offline   Reply With Quote
Old 09-15-2009, 02:59 AM   PM User | #3
PonchoX
New Coder

 
Join Date: Apr 2009
Location: Newport Beach, California
Posts: 56
Thanks: 6
Thanked 0 Times in 0 Posts
PonchoX is an unknown quantity at this point
Thank-you, kindly. You *are* a wizard.

So basically the margins of first and last elements .. nearest the top and bottom of that div .. were causing the problem.

What would you suggest I do to clear the floats in "#mainContent"?

My Dreamweaver starter page says:

Quote:
This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats
What if I » display: none?? Will that both clear and hide?

Update .. display: none gets rid of the graphic (at the bottom) .. but will that kill my clear?

Last edited by PonchoX; 09-15-2009 at 03:32 AM..
PonchoX is offline   Reply With Quote
Old 09-15-2009, 04:15 AM   PM User | #4
Fisher
Regular Coder

 
Join Date: Jan 2009
Posts: 316
Thanks: 7
Thanked 92 Times in 91 Posts
Fisher is on a distinguished road
Shouldn't affect your clear. Otherwise, you can just apply the clear to the footer (footsie).

If you want the blue sidebars overlapping your footer, leave it the way it is. Otherwise, you'll have to make 3 more changes:
Code:
.gnarlyHybrid #sidebar1 {
	float: left;
	width: 11em;
	background: #699;
	padding: 0;
}
.gnarlyHybrid #sidebar2 {
	float: right;
	width: 11em;
	background: #699;
	padding: 0;
}
.rad {
	background-color:#141414;
	padding: 10px 6px 6px 6px;
	border-right: 10px solid #699;
	border-left: 10px solid #699;
	text-align: center;
	margin-top:15px;
}
Fisher is offline   Reply With Quote
Users who have thanked Fisher for this post:
PonchoX (09-15-2009)
Old 09-15-2009, 05:30 AM   PM User | #5
PonchoX
New Coder

 
Join Date: Apr 2009
Location: Newport Beach, California
Posts: 56
Thanks: 6
Thanked 0 Times in 0 Posts
PonchoX is an unknown quantity at this point
Hi.

Can't thank you enough. The more I use CSS, the more convinced I am it contains an element of black magic.

I still get the over-lap in IE8.

I see you eliminated the 15px padding I had set for the TOP of the sidebars. Why would the TOP padding affect the BOTTOM overlap?

Funny how, after seeing things a certain way for a long time, we just get used to them. Takes someody pointing out a problem to bring it to our attention.

I long ago rationalized away the bottom overlap problem by figuring not many visitors would be scrolling to the bottom .. especially after I put that menu bar at the top.

What tools do you use to troubleshoot? Firefox plugins?

Last edited by PonchoX; 09-15-2009 at 05:34 AM..
PonchoX is offline   Reply With Quote
Old 09-15-2009, 06:13 AM   PM User | #6
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: God's own country
Posts: 11,386
Thanks: 149
Thanked 1,585 Times in 1,575 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
What tools do you use to troubleshoot? Firefox plugins?
Most probably be firebug!
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft 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 08:59 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.