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
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
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:
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:
For details on the CSS properties used, see MDN: margin.
Jump to Post— Member #120589YUK! <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.
Jump to Post— Member #334542There is no need of two tags opening and closing for <br></br> always use <br/>. Its a simple and practice method.
I am use <p> </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 is just used for horizontal spacing. <br><p> or all have the different functions. please don't mix <p> with
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.
There is no need of two tags opening and closing for <br></br> always use <br/>. Its a simple and practice method.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.