• Resolved sorenblixt

    (@sorenblixt)


    I need to reduce the white space (margin) above and under the text, on all pages with text (not on front page, no text there). (theme: West)
    I have tried different custom css tricks, but none works
    I do not know whether the white space is called padding or margin, and how to change it.
    Does anyone know a css code that would work, so I can adjust the space in the top and bottom of the text area? (Inside the text area)

    The site I need help with is https://www.tradenmark.com.

Viewing 8 replies - 1 through 8 (of 8 total)
  • each line of text seems to be wrapped in a paragraph <p> with a bottom margin of 10 px. You can try adding a css rule to decrease the margin on the bottom of each paragraph.
    what you currently have

     
    p {
        margin: 0 0 10px;
    }

    add this rule to your child theme css or to your custom css.

    p {
        margin: 0 0 2px;
    }
    • This reply was modified 8 years, 2 months ago by mrtom414.
    Thread Starter sorenblixt

    (@sorenblixt)

    Thanks, but this only reduces the line spacing between the lines, which makes the white text area smaller (reduces the height) – the cap in the bottom and on the top, is still the same above and under the text?? Help…….

    You want just the padding at the top and bottom reduced ?

    you can try this css rule

    .hentry {
       padding 12px;
     
    }
    Thread Starter sorenblixt

    (@sorenblixt)

    I want the text to be closer to the edge of the white box – the white gap / margin on top and in the bottom is too large..

    The css code do not work….

    there are 2 different rules effecting the space the first one is

    .hentry {
        margin: 0 0 75px;
        padding: 30px;
        background-color: #fff;
        position: relative;
        border: 1px solid #f3f3f3;
    } 

    the second problem is you have a header

    There nothing in it you can hide it with this statement.

    
    entry-header{
       display:none;
    }

    and reduce the padding in the .hentry to something smaller than 30. If you want to leave the padding for the side margin you can add this rule. You can adjust the 0px to your desired padding.

    .hentry{
    padding: 0px 30px;
    }

    Thread Starter sorenblixt

    (@sorenblixt)

    It helps a bit… thanks … but when I move the text closer to the top by adjusting padding, the text in the bottom gets too close to the edge..

    If I can adjust the padding separately for the top, and separately for the bottom, that would be perfect – is that possible?

    the padding statement does that it padding top-bottom right-left;
    if you say padding 30px 0 it add 30px to the top and bottom. if you want more padding top and bottom just adjust the first value to something like padding 40px 0.

    You can also adjust it with padding top right bottom left;
    if you said padding 10px 0px 5px 0 px it would make the top 10px the right 0 px the bottom 5px and the left 0px.

    you can read more at this link https://www.w3schools.com/css/css_padding.asp

    • This reply was modified 8 years, 2 months ago by mrtom414.
    Thread Starter sorenblixt

    (@sorenblixt)

    Understood and it works – thank you so much

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Reduce the white space above and under the text’ is closed to new replies.