Looking for a solution to move specific text downwards within its container without affecting the entire layout.
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,300");
*
{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body
{
font-family: 'Open Sans';
background-color: lightgray;
}
a
{
text-decoration: none;
color: #fff;
}
div#header
{
background-image: url("header_img.png");
background-size: cover;
background-repeat: no-repeat;
width: 80%;
height: 220px;
margin: 0 auto;
margin-top: 50;
color: #fff;
font-size: 22px;
}
div#header span
{
font-weight: 300;
}
div#header h3
{
text-align: center;
padding-top: 85px;
}
div#header h4
{
text-align: center;
}
/*
#222222 - top nav
#F5F5F5 - sidebar background color
#FFF - sidebar link hover background color
#63B7E8 - sidebar nav link hover text color
#D8D8D8 - sidebar nav text color
50px top margin
50px bottom margin
*/
/* Navigation */
/* Nav Title */
.nav
{
background-color: dimgray;
width: 80%;
height: 40px;
margin: 0 auto;
}
/* Remove bullet points on list */
.nav ul
{
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: dimgray;
}
.nav ul li
{
float: left;
}
.nav ul li a
{
display: block;
color: #fff;
text-align: center;
padding: 14px; 16px;
text-decoration: none;
}
.nav ul li a:hover
{
color: #099;
background-color: #fff;
}
.home-content
{
width: 80%;
height: 350px;
margin: 0 auto;
margin-top: 30px;
text-align: center;
font-size: 22px;
background-color: #fff;
}
.home-content span
{
font-weight: 300;
}
/* The text I am looking to reposition further down within its container. */
.title
{
margin-top: 15px;
}
/* I also experimented with:
.home-content h3
{
margin-top: 15px;
}
*/
<html>
<head>
<title>Dashboard</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="container">
<div id="header">
<h3>Sample<span> Text</span></h3>
<h4>Sample. Text. Here.</h4>
</div>
</div>
<div class="container">
<!-- Navigation -->
<div class="nav">
<ul>
<li><a class="active" href="#">Home</a></li>
<li><a href="#">Menu1</a></li>
<li><a href="#">Menu2</a></li>
<li><a href="#">Menu3</a></li>
</ul>
</div>
<div class="home-content">
<div class="title">
<h3>Default<span> Text</span></h3>
</div>
</div>
</div>
</body>
</html>
Any suggestions on how to isolate and move just the desired text downwards? Your help would be greatly appreciated. Thank you. I have also attempted using padding, but it seems to yield the same outcome.