csstachyons-css

Position a section directly below another section with Tachyons CSS


Using the Tachyons CSS Toolkit I would like to move the lightblue (please see codepen example below) area directly under the blue navigation bar.

As fas as I can see the <h1> element has a margin-top: 0.67em which causes the white area above the theme title.

Example
https://codepen.io/anon/pen/eedwBE


Solution

  • just add this to your css

    h1, h2, h3 {
    margin: 0;/* the margin you want */
    }
    

    and see CSS Selectors

    In CSS, selectors are patterns used to select the element(s) you want to style.

    Use our CSS Selector Tester to demonstrate the different selectors.

    The "CSS" column indicates in which CSS version the property is defined (CSS1, CSS2, or CSS3).