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 10-25-2011, 08:39 PM   PM User | #1
Pixelologist
New to the CF scene

 
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Pixelologist is an unknown quantity at this point
Question Clearing issue(?) in IE 7

I know just enough HTML/CSS to be dangerous, as the saying goes - so I'm hoping someone here can help a newbie figure out what seems clearly to be an IE issue.

I've just begun a job working with this site - www.risops.org. I know, I know...it's terribly exciting to look at. Here's the problem:

On the Announcements page and the Events & Education page, the main content is being being pushed down to just under the bottom of the sidebar menu. Only in IE7 and 8. I haven't had an opportunity to check the site in any other versions of IE but it renders just fine in Firefox, Chrome and Safari on Mac and Windows.

I can't figure out why. I thought it might have something to do with what appears to be an empty (except for an anchor link) div at the top of the main content area but taking that out - while keeping the anchor link - did nothing to fix the IE rendering.

Can anyone help me figure out why just those two pages give IE problems? If it helps, the code for the site is pretty extensively commented...

Thanks in advance, folks!

Neal
Pixelologist is offline   Reply With Quote
Old 10-25-2011, 08:59 PM   PM User | #2
resdog
Regular Coder

 
Join Date: Aug 2011
Location: U.S.A.
Posts: 233
Thanks: 2
Thanked 48 Times in 48 Posts
resdog is on a distinguished road
Your problem is the use of margins and padding. Since you are floating the sidebar, you don't need to have the margin-left for the #mainContent. Removing the margin-left will bring it to be to the right of the sidebar. Or, you can shrink the margin-left to 230px, which will also fix it.
__________________
WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.
resdog is offline   Reply With Quote
Old 10-25-2011, 09:12 PM   PM User | #3
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 Pixelologist,
I've used this same method many times, floating the sidebar and margining the content over.
The actual problem here is what you put in #mainContent. On your Announcments page the table that holds your links is too wide. I did not look at the other page to see what is too wide there.

You could reduce that 25px right margin to accomodate the wider table, it may be fine to set that to 0 even.

See the box model here. The box model says that whatever you put inside an element cannot be larger than that element. margin/padding/border all count when figuring width/height.
__________________
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 10-26-2011, 06:00 PM   PM User | #4
Pixelologist
New to the CF scene

 
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Pixelologist is an unknown quantity at this point
Thumbs up

Thanks for the feedback. Not only am I pretty new to coding, in general, but I'm getting tossed onto sites that are to a greater or lesser degree messy enough in their code that even I can see they're insane. I just can't easily figure out how to fix 'em (for many of them it'd be easier just to start from scratch but I'll need to convince folks of this).

So, thanks! I'll try these out this afternoon.

Cheers!
Pixelologist is offline   Reply With Quote
Reply

Bookmarks

Tags
internet explorer

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:14 AM.


Advertisement
Log in to turn off these ads.