econchick / econchick/new-coder

Styling of html headers creates overlap of box-models

Open
#194 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
591
Forks
378
PR merge metrics
No merged PRs in 30d

Description

The header style in custom.css creates an overlap with the text above it. In some cases, depending on the content, it prevents links from being clickable.

![newcoder](https://cloud.githubusercontent.com/assets/10945881/11405369/e19e8e50-936c-11e5-9318-de687b863f48.jpg)

Below is the offending style:

``` css
/*Hacky way to make sure anchors are pushed down because of the sticky navbar*/
h1[id], h2[id], h3[id], h4[id], h5[id] {
padding-top: 70px;
margin-top: -70px;
display: inline-block; /* required for webkit browsers */
}
```

Using the `:before` tag allows you to adjust the headers height, but the `width: 0;` keeps links clickable!

``` css
h1[id]:before, h2[id]:before, h3[id]:before, h4[id]:before, h5[id]:before {
content: ' ';
display: block;
position: relative;
width: 0;
height: 70px;
margin-top: -70px;
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.