Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<br> has different spacing in FF

Status
Not open for further replies.
Mar 11, 2004
127
GB
I'm testing my site on IE and FF. The layout I'm happy with, but now I have come to put content in it, I'm getting different spacing issues between IE and Firefox. The spaces created with a <br> tag are much larger in Firefox than when they are displayed in IE.

Can someone suggest a reason why, or a different way to approach the spacing issues?

Thanks,
Ant
 
Can you post your code, or a URL to it?

The most likely reason is a lack of a complete DOCTYPE at the top of you code. They look something like this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]

Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]
 
It seems to have a complete DOCTYPE, but I will double check as its probaly the normal dreamweaver standard one. None of the code is uploaded yet, but I will also see if I can get some of that sorted soon aswell.
 
Of course, you can always specify line height in your CSS. That should lock it down for any decent browser.

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Edward, could you give me an example of an entry for specifiying the line height please.


Thanks
Ant
 
Well, in the head of your HTML document, you should include a line such as this

Code:
<link rel="stylesheet" href="SmellyFoot.css" type="text/css" />

And then in the same directory, you have a file called [tt]SmellyFoot.css[/tt] and somewhere in there, you have a sequence such as this

Code:
p
{
text-align: left;
padding-top: 0px;
padding-bottom: 0px;
margin-top: 0px;
margin-bottom: 20px;
margin-left: 0px;
margin-right: 0px;
line-height: 10pt;
}

and then back in your HTML document, just be sure all your paragraphs are properly enclosed in p tags.

Hope that helps!

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top