I wanted to ask for some feedback. I tried to recreate this site, http://jonchretien.com/. This is my attempt. I had some issues with the image. The whole page is wrapper into a container div and I am having trouble having the image fill the full width of said div.
Beyond that, I wanted to ask - where can I go from here? I find that it is very hard to learn HTML and CSS because everything is very, shall we say, fluid. Is there a book I could read that could help me understand it better? I often find it very hard to decide how many elements a certain part should be made out of (does every element need to have a container/parent div?) and using CSS akin to fishing with a rake while wearing a blindfold.
Could anyone please take a look and point out things that I shouldn't be doing?
body {
padding: 0;
margin: 0;
border-top: 13px solid gray;
background: black;
color: white;
font-family: 'Open Sans', sans-serif;
}
h1 {
display: inline-block;
font-size: 40px;
font-weight: 800;
border-bottom: 3px solid gray;
letter-spacing: 1px;
padding-bottom: 3px;
}
h4 {
display: block;
font-size: 20px;
border-bottom: 1px solid gray;
padding-bottom: 10px;
}
.content-body{
box-sizing: border-box;
margin: 0 auto;
padding-top: 10px;
width: 40%;
}
.about-me {
margin-top: -15px;
font-size: 23px;
margin-bottom: -10px;
}
span {
color: yellow;
}
.selected-work{
list-style-type: none;
padding-left: 0;
padding-bottom: 0;
margin-top: -10px;
}
a {
color: yellow;
text-decoration: none;
padding-bottom: -5px;
padding-bottom: 0;
font-size: 20px;
}
p {
margin-top: -3px;
font-size: 18px;
font-weight: 500;
padding-bottom: 10px;
}
img {
max-height: 100%;
max-width: 100%;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="style/master.css">
<title>Simple Portfolio site</title>
</head>
<body>
<section class="content-body">
<header>
<h1>Hello</h1>
<p class="about-me">
I am Mart Lepanen. Lorem ipsum <span>dolor</span> sit amet, consectetur adipiscing elit. In non eros <span>odio</span>. Vivamus sit <span>amet scelerisque lorem</span>.
</p>
</header>
<div class="writings">
<h4>Selected Works</h4>
<ul class="selected-work">
<li class="example">
<a href="#" class="example-title">
A Major Music Sharing Service for artists
</a>
<p class="description">
Front end code
</p>
</li>
<li class="example">
<a href="#" class="example-title">
A Major Music Sharing Service for artists
</a>
<p class="description">
Front end code
</p>
</li>
<li class="example">
<a href="#" class="example-title">
A Major Music Sharing Service for artists
</a>
<p class="description">
Front end code
</p>
</li>
<li class="example">
<a href="#" class="example-title">
A Major Music Sharing Service for artists
</a>
<p class="description">
Front end code
</p>
</li>
<li class="example">
<a href="#" class="example-title">
A Major Music Sharing Service for artists
</a>
<p class="description">
Front end code
</p>
</li>
</ul>
</div>
<div class="photography">
<h4>Photography</h4>
<img src="https://static.pexels.com/photos/36012/pexels-photo.jpg" height="450" width="300" alt="An image licensed for re-use with modification">
</div>
<div class="contact">
<h4>Reach out</h4>
<ul>
<li><a href="#">Email</a></li>
<li><a href="#">Github</a></li>
<li><a href="#">'Gram</a></li>
</ul>
</div>
<div class="footer">
<h4>Footnote</h4>
<p>Rights Reserved</p>
</div>
</section>
</body>
</html>