Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder cineweekly.com's Avatar
    Join Date
    Aug 2010
    Posts
    485
    Thanks
    14
    Thanked 3 Times in 3 Posts

    Why does IE add space to </p> tags?

    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.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder cineweekly.com's Avatar
    Join Date
    Aug 2010
    Posts
    485
    Thanks
    14
    Thanked 3 Times in 3 Posts
    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.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    <center> is deprecated and should not be used. It's good you've removed them.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    Regular Coder cineweekly.com's Avatar
    Join Date
    Aug 2010
    Posts
    485
    Thanks
    14
    Thanked 3 Times in 3 Posts
    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 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.

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #7
    Regular Coder cineweekly.com's Avatar
    Join Date
    Aug 2010
    Posts
    485
    Thanks
    14
    Thanked 3 Times in 3 Posts
    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

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    I'm sure that's fine.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #9
    Regular Coder
    Join Date
    Aug 2010
    Posts
    133
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cineweekly.com View Post
    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.
    Last edited by njfail; 12-12-2010 at 11:22 PM.

  • #10
    Regular Coder cineweekly.com's Avatar
    Join Date
    Aug 2010
    Posts
    485
    Thanks
    14
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by njfail View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •