Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DIV layout problem in IE, fine in Firefox, Safari, Opera & Flock

Featured Replies

Can somebody help work out what Internet Explorers problem is with displaying a site I designed: www.darwenonline.co.uk?

 

The site looks as it should in most browsers (Firefox, Opera, Flock etc) but when opened in Internet Explorer the site look different, it isn't handling the DIV's correctly. Whenever I've tried to correct this so far to make the site look OK in IE it changes the way it looks in the other browsers.

 

The main problems are:

 

- Main content left aligned, rather than central

- Search form below sub-menu rather than on the same line

- Events calendar and advert on separate lines rather than side by side (not too much of a problem as possibly looking to change this layout anyway)

 

Please help, it's driving me nuts, I've tried various things but everything I do seems to affect the other browsers. It's time some fresh eyes looked at the site.

 

Thanks for any help you can provide

prizefinder

 

although it is a while since you posted this I would recommend the code below for ie6

add a css sheet at the path specified the case below uses a file called main_ie.css in a folder called css

 

Essentially all browsers other than ie6 will ignore this so just make specific changes for ie6 in this style sheet and it will only change the css layout for ie6.

 

 

<!--[if IE 6]>

<link rel="stylesheet" type="text/css" href="css/main_ie.css" />

<![endif]-->

 

Good Luck

 

Matt

Visit My Website Seoogle

  • 2 weeks later...
  • Author

Thanks for your help, I was beginning to think I'd come up with something people really struggle to answer.

 

Your tip is great and I'll definately be using it because the annoying thing was that whenever I managed to change something to look OK in IE it looked terrible in the rest.

 

I'm just not sure how to make the site look right in IE once I create the second stylesheet. I suspect it has something to do with floats etc but don't really know what to look for. Now I'm struggling to locate what I should be changing.

 

The problems are (IE only):

 

1) The page isn't centre (center) aligned despite having margin-left/right set to auto

 

2) The search bar area has dropped down below the sub-navigation rather than feature alongside it

 

3) The images in the news section seem to ignore restraints I've placed on the size (max 150px)

 

4) The content of the main area seems to run into the right hand column rather than keeping within the white content area?

 

If you browse the site with any other browser (Firefox) you can see how the site SHOULD look, however IE wants to make life difficult for me!

 

Any help appreciated as always

  • Author
The main problems are:

 

- Main content left aligned, rather than central

- Search form below sub-menu rather than on the same line

- Events calendar and advert on separate lines rather than side by side

- Images ignore max width 150px within the news div in IE

- The text runs into the right hand side beyond the white content area

 

I've sorted the last issue (text running past the white space into the background) by removing a table WIDTH 100% attribute). This change didn't affect other browsers, so all OK there.

 

I am going to remove the events calendar so that's no longer a problem.

 

I suspect the image width being ignored is a straight-forward issue with work-arounds if required. I only want the news images to be kept to a maximum width/height of 150px. To do this I have set the following in CSS:

 

#news_desc img {

max-width:150px;

max-height:150px;

}

 

This controls the image attributes within the news_desc DIV in other browsers but not IE?

 

The main issue remains the centreing of the page and sub-navigation/search on one line. I'm still scratching my head

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.