skip to Main Content

I have mkdocs document with a HTML paragraph. This paragraph has an automatic margin and I want to remove it. In a normal HTML file I can just change it with:

<!DOCTYPE html>
<head>

    <title>Test Document</title>

    <meta charset="UTF-8">

    <style>

        h1, p {

            margin-top: 0px;

        }

    </style>

</head>



<body>



    <h1>Headline</h1>

    <p>Hello</p>



</body>

Here it works just fine but when I try the same in an mkdocs document that has an paragraph it´s not working?

2

Answers


  1. Chosen as BEST ANSWER

    So I tried some stuff and apparently one needs to give the paragraph an id and edit the style for that id. When I have a style for the p elements, it´s not working.


  2. Sometimes themes in MkDocs have specific class names or structures for different elements. You might need to inspect the generated HTML output to find out the classes or IDs associated with paragraphs.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search