Skip to main content
Participant
February 2, 2018
Answered

Text bar problems

  • February 2, 2018
  • 2 replies
  • 317 views

Hi All

I am doing a website course, and my test is next tuesday. I always made my header in FW and inserted as image and used css rule to create heading 1,eg.. sarif, font size 36, centered. I had no problems except anytime I pushed the enter button there was a huge gap between the heading and the paragraph. Although I paid no mind to this. My teacher just told me last tuesday in part 1 of the test "prep night" that I shouldn't do it this way, cause how can they see I followed the guidelines on the master page. So I sat down today and tried to practice for time purposes as we only have two hours to do it all. The problem I am having is when I insert the text and apply the html 'heading 1' before the rule it is fine, after the rule it looks fine until you look in live then it pushes the writing up, if I align it to height it puts it aligned and looks normal, however live all the div tags are now pushed down. If I create the rule before I type, it's the very same and after. I don't know what to do, as when I ask my teacher questions he always try's to work on things and never gets back to me, he doesn't answer my emails or texts and when I called him, he just says he can't help me if he can't see. I seem to always work things out myself, however I tried everything I know and feel like I will now probably fail test due to this. Can anybody help me please

    This topic has been closed for replies.
    Correct answer Nancy OShea

    By default, all browsers add their own padding and margins to elements.   Assuming you want your <h1> heading to have no margins or padding, add this to your CSS code.

    h1 {

    margin:0;

    padding:0;

    }

    Repeat this with other problem HTML elements.   Or  create a consistent baseline with a CSS Reset.

    https://cssreset.com/what-is-a-css-reset/

    Good luck on your test!

    Nancy

    2 replies

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    February 3, 2018

    By default, all browsers add their own padding and margins to elements.   Assuming you want your <h1> heading to have no margins or padding, add this to your CSS code.

    h1 {

    margin:0;

    padding:0;

    }

    Repeat this with other problem HTML elements.   Or  create a consistent baseline with a CSS Reset.

    https://cssreset.com/what-is-a-css-reset/

    Good luck on your test!

    Nancy

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    February 2, 2018

    <=without    any code, nor visual of what you get and what you will expect... it's pretty confuse, could you send us some piece of code, and visual ?