Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter albert3858

    (@albert3858)

    Any suggestions very gratefully welcomed. Pls let me know I haven’t outlined the problem clearly enough. Thx

    Your new page doesn’t have many of the same CSS classes so the regular CSS is not applied to that page. Some of those are because the custom page doesn’t have the same HTML structure – so for example, this is the CSS for the good page for p tags:

    .entry-content p, .entry-summary p, .comment-content p, .mu_register p {
        line-height: 1.71429;
        margin: 0 0 1.71429rem;
    }

    For your new page, p tags have no CSS – hence the lack of spacing.

    One way to sort this is to use a browser tool like Firebug to look at the CSS for one page vs. the other side by side – then you’ll need to modify the CSS or the HTML so that the CSS applies to the new page.

    Thread Starter albert3858

    (@albert3858)

    Many thanks – will give it a go.

    Thread Starter albert3858

    (@albert3858)

    Apologies, but I suspect I am missing something basic. Tried comparing in Firebug as suggested but the CSS for the pages came up as identical, including the p tags?

    Well, Firebug shows it quite clearly – it’s not identical at all for that section of the page – look at the CSS for the <p> tags – there is none of twentytwelve styling being applied.

    I tried a few things – see if adding this to your child theme style.css file works –

    .home p {
        line-height: 1.71429;
        margin: 0 0 1.71429rem;
    }
    
    .home h2 {
        margin-bottom: 1.71429rem;
    }
    Thread Starter albert3858

    (@albert3858)

    Many thanks – that fixed it! Much appreciated.

    I still think I must have been looking at the wrong thing re the CSS in Firebug. I opened Firebug, clicked the CSS tab and copied and pasted the code for each page in turn from the window into Word. I eyeballed it and it looked identical so to be sure I did a “Compare Docs” and got a “no difference” back. If I’m doing something basic wrong, pls let me know, so I don’t waste your (or anyone else’s ) time in future. Thanks again.

    The code for the (properly formatted) blog page was:

    [ 897 lines of code moderated, that’s just way too much. For that many lines of code please use pastebin.com instead. Or just post a link to your CSS style sheet. ]

    Thread Starter albert3858

    (@albert3858)

    Sorry – I was obviously doing something VERY wrong – there were no <p> tags at all in either of those code chunks I just posted!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Loss of formatting when displaying blog post on static home page’ is closed to new replies.