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 11-22-2011, 05:32 PM   PM User | #1
faboon
New to the CF scene

 
Join Date: Nov 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
faboon is an unknown quantity at this point
Totally stuck with an IE7 CSS bug...

Hi all,

I'm working on this website - http://www.ecruprint.com - which is a custom skin for the e-commerce site Big Cartel.

Forgive the messy CSS files, I will be cleaning them up later!

I'm trying to debug for IE7, and have a weird bug where the CSS width is not being obeyed.

This is the code for one of my main divs:

Code:
#main-content {
margin:0 auto;
width:940px;
overflow:hidden;
text-align:center;
}
This results in perfect layout in Chrome, FF and Safari, but Explorer seems to ignore the width and spits it out as 537px instead!

I've been using DebugBar in Explorer to try and work out what's going on, and that's what gave me the the 537px figure. I really have no clue what's going on here, and I'd really appreciate any ideas.

Many thanks
faboon is offline   Reply With Quote
Old 11-22-2011, 05:40 PM   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 faboon,
You have no DocType? Can hardly expect IE to get it even close without one. See the links in my signature line, DocType and Validation will both help you.
__________________
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 11-22-2011, 05:45 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
In sexy.css:
Code:
/* Content -------------------------------------------------*/


* html #main-content {
  width: 557px;
  width: 537px;
  }



/*============================================================
 Navigation
============================================================*/
__________________
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
Users who have thanked Excavator for this post:
faboon (11-23-2011)
Old 11-23-2011, 12:20 PM   PM User | #4
faboon
New to the CF scene

 
Join Date: Nov 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
faboon is an unknown quantity at this point
Yeah I've spotted that bit of code now - a simple search for "537px" in my CSS would've been a good start!

Thanks for the reply - this project is far from finished so I'll be looking at DocType and validation soon, thanks for the links.
faboon is offline   Reply With Quote
Reply

Bookmarks

Tags
css, debugging, ie7

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 03:25 PM.


Advertisement
Log in to turn off these ads.