Solved

HTML5/CSS floats display incorrectly with IE7

Posted on 2012-04-12
4
457 Views
Last Modified: 2012-06-27
I'm building a small website for a business. I'm not that well trained in coding. I use the web to troubleshoot often. I have found one error of display only in IE7 that is driving me nutz...lol !!! I'm utilizing HTML5 for rounded corners and shading...

I'm using a "container" div with 3 columns...I float left on the first...float right on the second...and then content for the center...displays just fine in all browsers aside from IE7...the "content" drops halfway down the page? I've used the "clear" function and "display" to no success?

Any ideas for this problem would be greatly appreciated !!!

#container2 {
      overflow: hidden;
      background-color:#fff;
      margin-left:auto;
      margin-right:auto;
      height:auto;
      width:960px;
      clear:all;
}

#leftside {
      float:left;
      margin:10px 10px 10px 10px;
      width:145px;
            border-style:solid;
      border-width:1px;
      border-color:#d7d7ff;
      -moz-border-radius: 15px;
      -webkit-border-radius: 15px;
   -khtml-border-radius: 15px;
    border-radius: 15px;
}

#rightside {
      float:right;
      margin:10px 10px 10px 10px;
      width:145px;
                  border-style:solid;
      border-width:1px;
      border-color:#d7d7ff;
      -moz-border-radius: 15px;
      -webkit-border-radius: 15px;
   -khtml-border-radius: 15px;
    border-radius: 15px;
}

#content {
      overflow:hidden;
      width:620px;
      margin:10px 170px 10px 170px;
      border-style:solid;
      border-width:1px;
      -moz-border-radius: 15px;
      -webkit-border-radius: 15px;
   -khtml-border-radius: 15px;
    border-radius: 15px;
      border-color:#d7d7ff;

}
0
Comment
Question by:PCWoes
  • 3
4 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 37838841
IE7 does not calculate dimensions to standard.  It is most likely that the total width of the columns as calculated by IE7 is greater than the width of the container so it drops down to the next available empty area.

Either increase the width of the container until it lines up correctly, or reduce the width of one or more of the contained elements.


Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 37838873
If that does not solve it I think I will need a link to the page to see what it is doing.

Cd&
0
 

Author Closing Comment

by:PCWoes
ID: 37839025
Dropped width of content 10px and solved...thank you...cross browser design is interesting for sure !!!
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 37839098
It is much less of a challenge today than it was before there were any real standards. Fortunately the browser manufacturers have finally realized that competing on the basis of standards compliance is a good thing.

Cd&
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now