...

View Full Version : Why does IE add space to </p> tags?



cineweekly.com
12-12-2010, 05:32 AM
I'm trying to be a good boy and close my tags properly and everything's going well except IE puts additional white space in place of </p> tags. FF, Safari, and Opera don't do it. Why is IE so hard headed?

You can see it makes a big difference here: http://www.cineweekly.com/contact.php

Bonus Points: Also, my php date is a little wonky. It should be level with "CineWeekly.com" but it's in-between that and "Contact". I'm sure it's a float issue. And, in every browser except FF, the first paragraph under <h1> is 11 or so pixels lower.

Excavator
12-12-2010, 10:20 AM
Hello cineweekly.com,

p {margin: 0;} would eliminate all space.
p {margin: 1em 1em 0;} would put 1em on top and sides with 0 on the bottom.

Put a class on the p's you want to affect if you don't mean it to be a sitewide rule.

cineweekly.com
12-12-2010, 05:56 PM
I finally fixed it but I think the real problem goes back to my other thread about IE adding space. I had to remove the <center> tags and add text-align:center instead to the specific <p> tags. I'm trying to keep my css clean and manageable but I'm piling up <p> class styles now.

But that was on top of the help you gave me, I didn't realize my sitewide <p> margins weren't specified.

Excavator
12-12-2010, 06:04 PM
<center> is deprecated and should not be used. It's good you've removed them.

cineweekly.com
12-12-2010, 06:10 PM
Maybe you can help me on this instead of starting another thread. I'm going back and adding <h> tags and I think I only need 2 on most of my pages but I put my "subtitle" above the article title. How should I order the <h> tags then. For example, this page (http://www.cineweekly.com/sunday/preview01.php) is like 99.9% of the others, "Low Budget Spotlight" is the name of the weekly column but "The Last 3 Minutes" is the name of the article which I would think should be <h1>.

Sorry if I post too much, I just like talking about coding and knowing the reasoning and other methods.

Excavator
12-12-2010, 06:15 PM
Heading tags here - http://www.w3schools.com/TAGS/tag_hn.asp

http://www.webpagemistakes.ca/heading-structure-heading-tag/

cineweekly.com
12-12-2010, 06:29 PM
I've been reading up on them but I can't find a consistent answer. Is this ordering acceptable since the main title is more important for SEO etc.?

<h2>subtitle</h2>
<h1>main title</h1>

subtitle
main title

Excavator
12-12-2010, 06:39 PM
I'm sure that's fine.

njfail
12-12-2010, 11:17 PM
I've been reading up on them but I can't find a consistent answer. Is this ordering acceptable since the main title is more important for SEO etc.?

<h2>subtitle</h2>
<h1>main title</h1>

subtitle
main title

Yes, but keep in mind that search engines also take into account the size, font type in comparison to other fonts on the page, color compared to other colors on the page, the position of your headings on the page, and their context.

They invest billions to prevent people from 'tricking' their search engines. This prevents things like people from making headings and content for SEO purposes that are the same color as the background, so they're invisible to the actual visitors.

Google's formulas use millions of factors... it may seem far fetched but even car companies like GM have formulas to determine car features/styles/prices/marketing campaigns that have tens of thousands of factors.

Although I'm not aware of the actual formulas and point systems, I would imagine that h2 being over h1 might be -.001 point. Where as a person viewing your site for 10 minutes would be +1 point. So its more important to create the site for the viewers than it is for the search engine.

cineweekly.com
12-13-2010, 01:55 AM
Google's formulas use millions of factors...

I've spent all day watching videos from Matt Cutts (works at Google) on YouTube and finally found one where he mentions <h2> above <h1> is perfectly fine. He also talks about the 200 or so things that go into Google ranking your site.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum