Does anyone know an easier way to space down that will work for both IE and Firefox and display the same. I am using:

<br></br>

It spaces so much more in IE rather than Firefox. Have any ideas? Thank you : )

- Drew

Dani AI

Generated

A few points to clarify and a practical fix that will make spacing consistent across browsers.

Several replies recommended inserting empty paragraphs or non-breaking-space entities (, ) or fiddling with line-break syntax (, ). Those are fragile, semantic hacks and can produce differing results because browsers have different default styles and parsing quirks. The cleaner, long-term approach — echoed by — is to control spacing with CSS and a standards-mode doctype so browsers use the same baseline.

Quick troubleshooting checklist:

  • Ensure a standards-mode doctype is present (see MDN: Doctype).
  • Use the browser DevTools to inspect the computed box model (margins, padding, line-height) for the elements involved.
  • Verify IE is not running in a legacy compatibility mode; document mode changes default styles.

Minimal CSS pattern to get predictable vertical spacing (use utility classes instead of empty elements):

/* reset common defaults */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* baseline */
html { font-size: 16px; }
body { line-height: 1.5; }

/* reusable spacing */
.space-above { margin-top: 1rem; }
.section   { margin-top: 1.5rem; }

Notes and cautions:

  • Prefer margin-based spacing over inserting blank elements; margins preserve semantics and are easier to manage responsively.
  • Use relative units (rem or em) for scalable layout and consistent vertical rhythm.
  • If older IE support is required, test in its various document modes and consider a small normalize/reset stylesheet.

For details on the CSS properties used, see MDN: margin.

Recommended Answers

All 5 Replies

I am use <p>&nbsp;</p> for the space and text is write in the <p></p>. Try it if useful to you.

SNIP

I use <p></p> in place of <br> tag, & I think &nbsp; is just used for horizontal spacing. <br><p> or &nbsp; all have the different functions. please don't mix <p> with &nbsp;

Member Avatar for Member #120589

YUK! <br></br> isn't even valid.
Use CSS to control spacing - margins and padding should do. Don't include pointless presentational markup. There's simply no need. What you propose is a quick and dirty fix, but it may come back to haunt you.

Does anyone know an easier way to space down that will work for both IE and Firefox and display the same. I am using:

<br></br>

It spaces so much more in IE rather than Firefox. Have any ideas? Thank you : )

- Drew

I'm just learning this so I've been trying to fix that too. <br></br> works in Firefox, and </br> works in IE by itself but the one to use is <br /> notice the space between br and the /. This works just fine in bot IE and Firefox.

Member Avatar for Member #334542

There is no need of two tags opening and closing for <br></br> always use <br/>. Its a simple and practice method.

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.