Explanation
In order to, for testing purpose, recreate (not exactly) this site's style, is this code below the right approach? I mean, would it be the common/best way to do it?
Sorry if it's to simple for a question, but it's because I found a lot of templates using display
, position
, top
, left
, etc, that, as I'm new to web dev, I guess I'm probably doing something wrong - since I used a few lines to do it.
ps: I didn't use text-align: center
because I'm using Bootstrap's text-center
class, which, I think, does the same.
Code
body {
background-color: #2098D1 !important;
}
h1, p {
color: white !important;
}
.site-wrapper {
margin-top: 230px;
}
.site-wrapper p {
margin-top: 15px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
</head>
<body>
<div class="site-wrapper text-center">
<h1>Responsive Front-end Development</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
</div>
</body>
</html>
Thanks in advance,
Luiz.