Tips for Friday

Here are a couple of CSS bits that I use every so often.

The first one helps get rid of the outline on links. When a user clicks the your nicely designed navigation or button usually the outline doesn’t look so good:

:focus {
outline: none;}

The next one is for helping get rid of page shift with a centered website design. It’s an easy and valid way to force only the vertical scrollbar to appear (1px), no matter what size the viewport is:

html {
min-height: 100%;
margin-bottom: 1px;}

Now if a page is long or short, clicking through it wont feel so jarring.

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)