Anchor Tag Within Div Feels Like Not Part Of The Div
I am working on a project for school and I am making a section 50% being some text and an anchor tag and 50% being an image. So the section is a bit weird, the anchor tag is not go
Solution 1:
your h1 margin: 0% is overriding your margin property in the anchor.
Solution 2:
I cleaned up your css. Now you can give margin property without changing size of the div
.make-account {
height: 100%;
width: 50%;
margin-top: 0.5%;
background-color: #EBCEBF;
display: flex;
flex-flow: column;
justify-content: space-between;
}
.make-accounth1 {
text-align: center;
color: #FDF8F5;
}
.make-accounta {
color: #FDF8F5;
background-color: #266150;
padding: 1%3%1%3%;
margin-bottom: 30px;
}
<!DOCTYPE html><html><head><title>HTML, CSS and JavaScript demo</title></head><body><!-- Start your code here --><header><nav><spanclass="branding">SportBuddy</span><ul><liclass="active"><ahref="#">Home</a></li><li><ahref="#">Find People</a></li><li><ahref="#">My Friends</a></li><liclass="dropdown"><ahref="#">Account</a></li><!-- <li class="account"><a href="#"><img src="img/account.png"></a></li> --></ul></nav></header><divclass="make-account"><h1>WE HELP YOU FIND YOUR OWN SPORTBUDDY!</h1><ahref="#">MAKE AN ACCOUNT</a></div></body></html>
Post a Comment for "Anchor Tag Within Div Feels Like Not Part Of The Div"