From da43a983e2989e155a95a4dd0324f61cd5a9fada Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 5 Apr 2015 16:19:29 +0200 Subject: home: fix picture positioning Since there is only one .inner child per .block element, only one style would apply. Fix it by applying the nth-child selector to .block instead of .block .inner. --- style/main.less | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/style/main.less b/style/main.less index 718f517..c90cd8c 100644 --- a/style/main.less +++ b/style/main.less @@ -60,16 +60,8 @@ body[data-page="home"] { color: black; text-decoration: none; } - } - .block .inner { - width: 100%; - height: 100%; - padding: 1em; - - p { - margin: 1em; - } + /* position pictures depending on position of the blocks */ &:nth-child(2n+1) { p, h2 { margin-left: 200px; @@ -86,6 +78,17 @@ body[data-page="home"] { float: right; } } + + /* styling of the text block inside */ + .inner { + width: 100%; + height: 100%; + padding: 1em; + + p { + margin: 1em; + } + } } } -- cgit v1.2.1