473,382 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

IE 7 adding extra margin, & IE6, wow

Hello guys,

I really need some help here. Trying to get this site working on different browsers. FF/Chrome etc are no probs. But as you'll see IE7 adds some extra margin under my navbar. How do I fix this?

As for IE6...it is insane, it's ruined in that. I take it IE6 doesn't support PNGs? Do I have to use GIFs? And the transparency is just the beginning. The layout is insanely messed up. I've uploaded to my own free host for you to check it out. I assume you can view HTML/CSS with FF toolbars etc, otherwise I will post code if you need?

Thanks

http://amclellan.110mb.com/site.html
Mar 4 '09 #1
5 6905
David Laakso
397 Expert 256MB
All browsers get these changes:
Expand|Select|Wrap|Line Numbers
  1. #container { background-image:url('http://amclellan.110mb.com/images/main_bg.png')/*add*/;
  2. }
  3.  
  4. #banner {height:198px/*add to close v-gap*/;}
  5. #menubar { min-height: 27px/*add*/;}
  6. #menu {width:345px/*add -- floats need a width*/;float:left;}
  7. #blackbar {
  8.  width: /*513px*/ 512px/*amend*/;
  9. /*height:27px;delete*/
  10.  min-height: 27px/*add*/;
  11. }
  12. #searchbox { width: 190px/* add--floats need width*/;
  13. padding-top: 1px/*add*/; 
  14. margin-left: 330px/*add*/; 
  15. position:relative/*add*/;
  16. height:1px/*add*/;
  17.  /*padding-top:5px;delete*/
  18.  /*margin-left:320px;delete*/
  19. }
  20. #maincontent { 
  21.     /*height:500px delete-- let the amount of content determine height*/;
  22. }
  23. #left-column {
  24. overflow:hidden/*add*/;    
  25. /*height:500px delete-- let the amount of content determine height*/
  26. /*overflow:auto;delete+/
  27. }
  28. #right-column {
  29. \overflow:hidden/*add*/;
  30.     /*height:400px; delete-- let the amount of content determine height*/
  31.     float:left;
  32.     width:220px/*add--floats need a width*/;    
  33. }
  34. #footer { clear:both /*add to clear the floats*/;}
  35.  
Still with me..?
IE/6.0 and IE/7.0 get these hacks (maintain the order shown):
Expand|Select|Wrap|Line Numbers
  1. /* fix IE6 */
  2. * html #blackbar {    
  3. overflow-x:hidden;width: 506px;
  4.  height: 27px;
  5. }
  6. * html #searchbox {display:inline;}
  7. /* fix IE7 */
  8. *+html #searchbox {margin-left:167px;}
  9.  
IE/6 and down do not support transparent png's.
See a possible work around here:
http://www.twinhelix.com/css/iepngfix/
Mar 4 '09 #2
drhowarddrfine
7,435 Expert 4TB
@AndrewMcLellan
All versions of IE, including IE8 which isn't even out yet, are 11 years behind web standards or wrong in their implementation, as you've noticed.
Mar 5 '09 #3
David Laakso
397 Expert 256MB
As for IE6...it is insane
That's a given.

But the IE browsers are not the real problem here. Better coding practice up front in compliant browsers, setting primary content at default, extensive testing of your page at twice default, not using points for setting fonts on screens, and validating will get you a lot further a lot faster.
Mar 5 '09 #4
Hello David,

Thank you so much for you help. I have made the amendments.

Regarding the maincontent div.... when I take the height off it the background image does not expand down while the div does (You can check form the web link).

I appreciate your time and have learned a bit.

I'm not quite sure I'll know how to fix for IE in the future still, but I suppose in time I'll learn.

Thanks


ps. Yes I understand about IE, it's the devil...I hate it!
Mar 5 '09 #5
David Laakso
397 Expert 256MB
Regarding the maincontent div.... when I take the height off it the background image does not expand down while the div does
Set no height on #maincontent. It needs only to be opened to enclose the float contained within it. Not tested-- reset to (the border is for position only and should be deleted if all is well):
Expand|Select|Wrap|Line Numbers
  1. #maincontent {
  2. border: 1px solid fuchsia;
  3. overflow:hidden;
  4.     background-image:url('images/main_bg.png');
  5.     background-repeat:repeat-y;
  6.     margin-top:2px;
  7. }
  8.  
I have not tested this. If it is not doing what it should in in IE/6.0, add this hack for IE/6 to the style sheet.
Expand|Select|Wrap|Line Numbers
  1. * html #maincontent {
  2. border: 1px solid fuchsia;
  3. overflow:visible;
  4. }
  5.  
If it is not working in any browser, write back...

Remember not to forget IE/7.0 is not much better than IE/6.0. And that the forthcoming IE/8.0 will still be at least 3 years behind compliant browsers. This dose not mean you need throw yourself through a closed window. But keeping up to date on coping with stupidity is always an advantage...

A couple of helpful links regarding dealing with IE 6/7:
http://www.satzansatz.de/cssd/onhavinglayout.html
http://www.positioniseverything.net/

Current thinking among some is doing little more than making sure IE/6 is not upside down and backward is more than enough. The days of attempting pixel perfect cross-browser perfection are long gone and just encouraged IE to do nothing about its flagrant opposition to web standards.

Trivial pursuits: You still have one or more rule sets set in font-size using points. Using em as you have done is fine. I prefer percent myself for cross-browser consistency. More important: default for em is 1em not .8em as you have on the body; default for percent is 100% not 80%. And line height is almost always set as a raw number (no unit of measure is used). It's line-height: 1.3; Not line-height: 1.3em or line-height:130%;

Good luck and best...
~d
Mar 6 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: mappo | last post by:
There are about a million posts on how to get rid of the extra space _after_ the form end-tag, but I can't find any that solve my problem: extra space _in_ the form tag. I have a table nestled...
23
by: MattB | last post by:
Hello please help, I have a table cell with a div in it. The div has a width of 300px. but when it is rendered it puts extra space into the table cell. Here's the style <style>...
12
by: skeeterbug | last post by:
http://www.geocities.com/operationsengineer1/test2.htm the extra space between the logoHeader and the menu bar occurs when i add the <ul>. if i comment out the ul and and all the li, the 1em...
16
by: Uncle Pirate | last post by:
This has me stumped. I am trying to use as little space as possible at the top of my document but Firefox/Mozilla insists on placing vertical space before any element. IE displays it correctly...
3
by: Toe Dipper | last post by:
In short we have a lengthy process when a form is loaded that adds activex controls to our windows form. This process in itself works fine however we would like to push this processing to a thread...
2
by: moondaddy | last post by:
I'm trying to do something real simple. Add a thumb to a grid at the end of a line using c#. the code executes but I dont see the thumb. Can anyone explain what and what I need to do to properly...
3
by: Rich.Hephner | last post by:
Hi, I'm new to this group, but in need of some help with a css based two column layout. The layout consists of a short left nav and a content section. The problem is that in IE, the content...
1
by: swc76801 | last post by:
I desperately need help. My understanding of CSS is non-existent. I have a store http://astore.amazon.com/texasheat-20 with Amazon.com. According to the information from Amazon.com "Write your own...
1
by: superDk | last post by:
Hello, IE6 is adding a large margin between my two containers (container1 & container2) everything works fine in IE7 and Firefox. I've been searching on-line for a fix but I've had no luck. It...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.