Simple Coding Question

12 replies
Hi Everyone,

I need your help with a basic coding question. I just had a website completed for me which basically is setup where the blog post will show up on the main page and also has a separate blog post page where the same information is stored. When a new post is created, it replaces the current blog post on the main page but obviously all the separate blog post pages will remain.

The problem I am having is that the formatting on the main page blog post is not the same as on the separate blog post page. Basically, it does not recognize the page breaks <p> between each paragraph on the separate blog post page. But if I add another <p>, it will show the page break on the separate blog post page. The only problem with that is it will then show up as a double page break on the main page blog post.

Any ideas on what I should be specifically looking for in the coding to resolve this issue?
#coding #question #simple
  • Profile picture of the author Michael71
    Seems to be some CSS related stuff...
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8116183].message }}
    • Profile picture of the author JDSalinger
      Originally Posted by Michael71 View Post

      Seems to be some CSS related stuff...
      Thanks for the response. Where would I go look to find that type of information.
      {{ DiscussionBoard.errors[8116265].message }}
  • Profile picture of the author Michael71
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8116431].message }}
  • Profile picture of the author David V
    Originally Posted by JDSalinger View Post

    Hi Everyone,
    ... Basically, it does not recognize the page breaks <p> between each paragraph on the separate blog post page. But if I add another <p>, it will show the page break on the separate blog post page.
    Doesn't sound right... Do you have a url?
    Easier to see what's happening.
    {{ DiscussionBoard.errors[8116525].message }}
  • Profile picture of the author Edge360
    Yep - could you give us a URL to see what we are dealing with here?
    Signature
    {{ DiscussionBoard.errors[8118111].message }}
  • Profile picture of the author Michael71
    style.css line 23

    div, p, ul, li, form, h1, h2, select {
    padding: 0;
    margin: 0;
    }

    the margin: 0; seems to be your problem
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8118776].message }}
    • Profile picture of the author JDSalinger
      Originally Posted by Michael71 View Post

      style.css line 23

      div, p, ul, li, form, h1, h2, select {
      padding: 0;
      margin: 0;
      }

      the margin: 0; seems to be your problem
      What do you think I should change it to? I am very new to coding so I apologize for not knowing what to do next.
      {{ DiscussionBoard.errors[8118866].message }}
  • Profile picture of the author Michael71
    /*margin: 0;*/

    /* */ means you make it a "comment", just in case you need to revert
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[8118872].message }}
    • Profile picture of the author JDSalinger
      Originally Posted by Michael71 View Post

      /*margin: 0;*/

      /* */ means you make it a "comment", just in case you need to revert
      So you are saying I should change line 23 to read from:

      margin: 0; to /*margin: 0;*/ ?

      Ok, it looks like that worked. Thank you very much.

      The only thing is I am not sure exactly what this part means:
      "/* */ means you make it a "comment", just in case you need to revert"? What do I need to be worried about here?
      {{ DiscussionBoard.errors[8118885].message }}
      • Profile picture of the author Brandon Tanner
        Originally Posted by JDSalinger View Post

        The only thing is I am not sure exactly what this part means:
        "/* */ means you make it a "comment", just in case you need to revert"? What do I need to be worried about here?
        If it looks good, then you don't need to be worried about anything.

        The reason you comment stuff like that is so that if you had made that change, and it made it look worse, then you could simply un-comment it to revert back to the original setting. But if the change fixes your problem for you -- which appears to be the case here -- then you don't need that line at all (commenting that line is the same as deleting it, from the browser's perspective).

        That said, it's always a good idea to check any changes you make in all of the popular browsers, because sometimes a change will look good in one browser, and not so good in another (those types of inconsistencies can be virtually eliminated with good coding practices though).
        Signature

        {{ DiscussionBoard.errors[8119146].message }}

Trending Topics