下記画像のように表示させたいのですが、paddingが効かないのですが、何か原因はあるのでしょうか。何度やっても解決しないので質問致しました。
再投稿しました。
実際はこうなります。
html
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0"> <title>シングルページレイアウト</title> <link rel="stylesheet" href="http://fonts.googleapis.com/css?famliy=Raleway:700,400"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/normalize.css"> </head> <body> <header class="header"> <p class="site-title-sub">Web designer's portfolio</p> <h1 class="site-title">HI,MY NAME IS...</h1> <p class="site-description">Check out some of my works.</p> <div class="buttons"> <a class="button" href="#about">LEARN MORE</a> <a class="button button-showy" href="#contact">SEND MESSAGE</a> </div> </header>
css
@charset "UTF-8"; /* CSS Document */ html{ font-size:62.5%; } *,*::before,*::after{ box-sizing: border-box; } body{ background: #151515 url('../images/bg.png') no-repeat fixed left bottom; background-size:cover; color:#fff; text-align:center; font-size: 1.4rem; font-family:Raleway,"Hiragino Kaku Gothic ProN", Meiryo, sans-serif; } .header{ padding: 170px 30px 80px; } .site-title-sub{ margin: 0 0 30px; letter-spacing: 1px; font-size: 2.2rem; } .site-title-sub::before, .site-title-sub::after { content: ''; display: inline-block; width: 140px; height: 2px; margin: 0 30px; background-color: #fff; vertical-align: middle; } .site-title{ margin: 50px 0 40px; font-size: 7.6rem; } .site-description { margin-bottom: 50px; color: #888; font-size: 1.6rem; } .button{ display: inline-block; width: 200px; padding: 20px; text-decoration: none; border-radius: 4px; color: #fff; background-color: #afa58d; letter-spacing: 1px; font-size: 1.2rem; } .button:hover{ opacity: 0.9; } .button-showy{ background-color: #D29E04; } .buttons .button{ margin: 10px; }
回答1件
あなたの回答
tips
プレビュー