When setting up my HTML page, I wanted the content section to align to the right at the top.
After trying different CSS properties:
float: right; >> the content section moved to the right, but not to the top of the page.
float: top; >> the content section went back to the left.
Take a look at the screenshot for better understanding!
https://i.sstatic.net/fRRdZ.png
form.contact{
margin: 1% 1.5%;
padding: 5px;
border-style: solid;
width: 37.5%;
hight: auto;
}
#content{
float: right;
padding: 10px;
border:1px solid red;
width: 50%;
hight: auto;
}
form {
float: left;
margin: 1% 1.5%;
width: 63%;
}
nav{
float: left;
margin: 0 1.5%;
width: 63%;
}
footer{
float: left;
margin: 1% 1.5%;
width: 37.5%;
border-style: solid;
}
<form class="contact">
<label>Contact</label></br></br>
First name:
<input type="text" name="firstname" value="Your name please?">
<br><br>
Email:
<input type="text" name="lastname" value="Your email please?">
<br><br>
<input type="submit" value="Press the button">
</form>
<nav>
<a href = #>Just Me</a><br>
<a href = #>Portfolio</a>
</nav>
<section id = "content"><h2><strong>Content section</strong></h2></section>
<footer>
<label>Socializing</label>
</footer>