Hi,

Please visit my site at http://www.stopsweats.org/prevention-for-excessive-sweating/how-to-stop-excessive-sweating/

The ad which I have put is suppose to be on the right hand side and it works fine in firefox and chrome but ie keeps it dead center.

How do I get it to move in ie version 8 ?

Any help will be much appreciated.

Cheers,
Vishal

Dani AI

Generated

Good to see tracked this down after and checked the page on their machines. For anyone who sees an element appear centered only in Internet Explorer while other browsers place it correctly, the cause is usually a subtle interaction between the document mode, injected markup (ad scripts/iframes), and how IE handles floats/layout. The checklist below helps find and eliminate those causes quickly.

Common checks and practical moves:

  • Confirm the page is rendered in standards mode (use a modern DOCTYPE like <!DOCTYPE html>). Quirks/compatibility modes change box-model and float behavior.
  • Use IE’s F12 tools to check the document mode and computed styles; that often reveals an overriding inline style or a margin: 0 auto coming from an ad wrapper.
  • Inspect any ad iframe or script output; styles inside an iframe won’t be affected by the page stylesheet.
  • Prevent float-collapse by clearing the parent (use a clearfix) and make the floated block resilient in older IE by triggering layout or using inline-block where appropriate.
  • Compare the computed box model across browsers (width, margins, display) to spot differences.

A small, cross-browser pattern that helps diagnose and stabilize a floated ad:

.ad {
  float: right;
  margin-left: 1em;
  display: inline-block; /* helps with some IE behaviours */
  zoom: 1;               /* triggers layout in older IE versions */
}

.container:after {
  content: "";
  display: table;
  clear: both;
}

Further reading on floats and clearing: float - MDN and the micro clearfix pattern by Nicolas Gallagher (micro clearfix). When an ad is third-party content, inspect the exact markup the network injects; that often points immediately to the styling conflict.

Recommended Answers

All 5 Replies

Not sure I am understanding the question. I tested the page in Firefox, IE 8, Safari, and Chrome and the ad is on the right side in each one of them.

The ad is on the right for me also, both in Firefox and IE.

HI Guys,
Sorry I managed to solve it.


Cheers,

What was the problem, if you don't mind me asking?

Hi,
It was to do with the dimension of the div tag once I gave it that then IE was a good boy and displayed it correctly.

Cheers,
Vishal

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.