Web Hosting, Design, & Coding forum

General discussion

IE 6 doesnt display my site correctly

by dank327 / December 21, 2008 3:47 PM PST

I recentlly desgined a website, www.LuckyStacks.com , and the site does not display properly in ie6. I have viewed the site using ie7, safari, and firefox and all of these browsers so exactlly what i want but ie6 does not show the site properly. I had someone tell me that the site is not displaying properly because of my div tags but i have searched the code and i cant seem to find the problem. Is there anyway to fix this automatically with some software?

Discussion is locked
You are posting a reply to: IE 6 doesnt display my site correctly
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: IE 6 doesnt display my site correctly
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
by dank327 / January 7, 2009 1:24 PM PST
In reply to: Not bad!

I thought I was doing pretty well for someone who had never built a wegsite or even taken a class on how to build a website. The day I started building www.LuckyStacks.com was the first day i had ever even ateempted using DreamWeaver. Now after three months of working on the site I am becoming quite familar with html code. I must admit I did get some pointers along the way but doesnt everybody.

Collapse -
I really mean that!
by R. Proffitt Forum moderator / January 7, 2009 11:53 PM PST
In reply to: Thanks

I've seen far worse reports. I'd zero in on those 6 errors and keep in mind that these may or may not fix the issue. But when I'm faced with oddities like that I know to let it look over the site.

Collapse -
Some advice
by DocGSXR / January 20, 2009 11:55 PM PST

I think that you did a very good job on your first site. I know people that have taken classes and have not done as well. With that being said I have to say that getting a site to be cross browser compliant is a real pain in the rear, but it can be done. In time you will learn some of the ins and outs of what, how, and why certain browsers do things. IE6 is definitely a browser that makes me want to rip my hair out from time to time, but I have learned how to tame it after months of playing around trying to get different client's sites to render correctly in it.

The first thing I do when I build a site is I only view it in a standards compliant browser while I am building it, such as firefox. When I am done with the first page I then validate it and correct any issues. This is what was already suggested and you need to fix those errors, I doubt they will fix your issue, but you should still fix them.

The next thing to try and understand is how IE6 deals with DIV's. There are a couple of things to be mindful of.

First, Explorer calculates widths after the parent element is rendered so this can cause bugs when using percentages for column widths. You may want to make your sidebar an actual width like 200px or something like that.

Second, The content inside with padding might be larger than the main content box or larger than the sidebar. In firefox content inside a DIV will flow over the DIV without the DIV growing larger. This is not the case with IE6. If the data inside with padding is larger than the size of the div then the div will be made larger to accommodate the content. This will usually cause one of the div's to drop down below the other div instead of next to it.

Think of it this way. Say you have a total width of 1000px. 25% has been assigned to your sidebar and the rest is for your main content area. So 25% of 1000px is 250px. Now if the content inside the sidebar is greater than 250px wide (this includes padding) then it will spill over the sidebar. In firefox and IE7 and chrome/safari it shouldn't do anything but spill over the div's and should render fine. In IE6 it will make the sidebar bigger to accommodate the content so now it will be 300px instead of 250px, but your main content area has already been determined to be 750px, which now means you have 1050px worth of div tags but only 1000px of space to place it into so now it drops the main content box to the bottom.

If I were you I would set my sidebar to a fixed px width and set my right margin on my main content div to also be fixed px instead of 26% like you have it now. No real reason to have your sidebar in % in my eyes. Up to you though.

Collapse -
Using .css styles
by Paulsimon1983 / February 2, 2009 11:06 AM PST

As DocGSXR explains, you may want to check the divs of your site as they are quite difficult to understand ( at least for me ) but become a big problem when they are not correctly placed.
Moreover, I would recommend you to use .css styles depending on the browser which the user is using to visit your site. If you know the broswer you may use an if statement to place width of your elements in % or pixels ( a very common problem ) depending on wether your visitor uses Mozilla, IE, Safari... Use a php expression like $useragent = $_SERVER[?HTTP_USER_AGENT?]); to know the user browser information. If you have any questions regarding php programming feel free to contact me in http://www.bossingame.com. Once you know which browser is the user using, you may want to use one .css file or another with an if statement inside your php code. For instance, I use a style.css for Mozilla and a style_IE.css for Explorer. I hope this may help you...

Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions

Does BMW or Volvo do it best?

Pint-size luxury and funky style

Shopping for a new car this weekend? See how the BMW X2 stacks up against the Volvo XC40 in our side-by-side comparison.