Hi,

I'm doing a website, but it's correct when i run it with mozilla if i run it with IE the content goes all to the left.

Can someone help me?

Thank you,
PF2G

Dani AI

Generated

This is a common cross‑browser layout symptom: pages that look fine in Firefox but hug the left edge in Internet Explorer are usually in a different rendering mode or rely on layout behavior that IE treats differently. was on the right track pointing at the document mode; was right to steer the question toward CSS. Quick checklist and fixes that resolve this type of problem reliably.

Put a standards DOCTYPE at the very top of the HTML to force standards mode (no quirks). A minimal HTML5 declaration is simple:

<!DOCTYPE html>

More on why the DOCTYPE matters is here: Doctype — MDN

Center the visible page using a wrapper element that has an explicit width (or max-width) and horizontal auto margins; do not rely on setting the body to “auto” for centering. Example pattern:

#container {
max-width: 960px;
margin: 0 auto;
}

For centering techniques and edge cases see: Centering in CSS — CSS‑Tricks

If problems persist: validate the HTML/CSS with the W3C validator (validator.w3.org), open IE’s developer tools (F12) to check the Document Mode/Compatibility View, look for floated or absolutely positioned elements without widths, and consider using box-sizing: border-box to avoid padding/width surprises (box-sizing — MDN). These steps will narrow the cause and get the layout consistent across browsers.

Recommended Answers

All 2 Replies

Member Avatar for Member #120589

Try the CSS forum

I believe the problem occur because you did not declare your doctype or did not set the margin of body to auto. As you can see, firefox and chrome do have their support in plenty of plugins and will normally work but IE in the other hand do not support the plugins and we have to code it by ourselves

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.