PDA

View Full Version : <BR> tags don't work in IE normally


mkatight
March 2nd, 2007, 03:18 AM
I know this seems odd, but on my websites <br> tags do not work normally on Internet Explorer. In Firefox and Opera if I have two <br> tags in a row (<br><br>) then it will seperate the lines with a blank line in between, but in IE it takes 3 <br> tags to do what two would/should normally do.

In places where I have two <br> tags it shows up normally in firefox and opera, but in IE it doesn't put the blank line between. I have to add an additional one in order to get the desired effect, but then the spacing is too much in other browsers. I have never seen/had this problem before and it is really weird because other websites I see that are coded almost identically to the way mine are work fine in all browsers including IE.

Here are the three site URLs (all of which have this problem):

http://www.olsen-fan.net
http://www.bynes-fan.org
http://www.dierks-fan.com

Obviously there is some sort of issue with my coding since all three are doing it. I was hoping some expert may be able to recognize the problem by looking at either the style sheet or the coding...

Another thing I realized is that the break tags work normally on my side navigation bar, but not in the content area...this is really bizarre.

Buzz
March 2nd, 2007, 03:55 AM
It's not an issue with coding, it's an issue with IE. You can try using <p> tags rather then break tags.

mkatight
March 2nd, 2007, 04:03 AM
It's not an issue with coding, it's an issue with IE. You can try using <p> tags rather then break tags.

that's what I thought too...but other people's break tags exactly like mine work normally in IE. I mean two <br> tags is really basic and IE has never had issues with something like that...

Buzz
March 2nd, 2007, 04:09 AM
you don't have br tags styles in a stylesheet do you?

mkatight
March 2nd, 2007, 04:17 AM
you don't have br tags styles in a stylesheet do you?

nope

I just thought something in my stylesheet might be causing some sort of confliction. I really have no idea why it's not working, it makes no sense.

rockboy
March 2nd, 2007, 05:54 AM
I use double line breaks sometimes and they work the same in IE as any other browser so it's in your style sheet(s) somewhere.

In your html doc there are links to a bunch of extra css files including a second style sheet that looks like it might be the same as the main one. This could cause a cascading effect that IE treats differently.

Also you use line-heights as pts and some font sizes as px. There could be some overlap in the way they're treated too. It'll take some trial and error experimenting to fix it as I didnt see anything obvious.

Or you could just use p tags instead of double line breaks like Buzz suggested. That will make it look right in IE.

mkatight
March 2nd, 2007, 07:47 AM
I use double line breaks sometimes and they work the same in IE as any other browser so it's in your style sheet(s) somewhere.

In your html doc there are links to a bunch of extra css files including a second style sheet that looks like it might be the same as the main one. This could cause a cascading effect that IE treats differently.

Also you use line-heights as pts and some font sizes as px. There could be some overlap in the way they're treated too. It'll take some trial and error experimenting to fix it as I didnt see anything obvious.

Or you could just use p tags instead of double line breaks like Buzz suggested. That will make it look right in IE.

Thanks for pointing that out...when I put up new layouts I just edit my old files and stylesheet so I end up messing things up without noticing. I will try fixing the things you mentioned. Thanks for the help! You rock!

Except what are the links to extra css files you're referring to?

rockboy
March 2nd, 2007, 09:36 AM
Except what are the links to extra css files you're referring to? In the bynes file source code (the one I looked at) there was an extra link to a stylesheet named style_002.css which appeared to be the same as your main style.css. There were also several extra links to style.css. Guess you fixed them already. I don't see them now. Since the spacing is still messed up in IE it looks like that wasn't the cause.

mkatight
March 3rd, 2007, 07:36 AM
^^hmm that's really odd because I haven't done anything to that site in a while...anyway I fixed the problem. Thanks for all the help everyone. This: letter-spacing:1px; was causing the issue. That seems odd to me, but when I changed the spacing to 0 the spaces worked normally again! So I ended up changing it to 0.9 at the end and it works fine.

Buzz
March 3rd, 2007, 08:09 AM
:) letter-spacing: 0.9px means nothing :) it's reading it as 0. you can't have a .9 pixel. it's 1 or nothing. You might as well just remove the letter-spacing property.