[Resolved] HTML comment in GeneratePress?

Home Forums Support HTML comment in GeneratePress?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1093044
    Artem

    Hi. When I code in the content area and use HTML comment like this <!– comment –> my child div is moved down as if there is a text line before the child div:

    <div>   
                               <!-- This is a comment -->
                               <div></div>
    </div>
    

    Text “This is a comment” is not visible, but it occupies the space.
    Margin: 0; padding: 0; don’t help. Only removing this comment removes an empty space.
    When I test the code in CODEPEN everything is OK.
    How can I comment on my code in GeneratePress?
    Thanks.

    #1093477
    Leo
    Staff
    Customer Support

    Hi there,

    I’m not quite sure if I understand but GP doesn’t do anything special for HTML comment.

    The content between <!-- and --> would be marked as a comment.

    I’m not sure what all the <div>s are for?

    #1094290
    Artem

    Hi Leo,
    <div>s are for page layout. I’m coding my homepage in HTML. So, the problem appears when you switch between HTML editor and Visual editor. Apparently, the visual editor changes your HTML a little bit.
    I started from scratch with a new page and the problem has gone.
    Thank you.

    #1094772
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.