@AnthvirusSubmitted over 1 year ago
My submit button and input section are not optimal, any suggestions? Thanks.
My submit button and input section are not optimal, any suggestions? Thanks.
Be careful when styling dom nodes which effect a lot of things. For example, styling a div is not recommended as there are many divs on a page usually and your styling would effect all of them. If you imagine you wanted to code more content onto your page, when you use another div your styling would effect that new div too.
Instead, it is recommended to add a custom class name to what you want to style and then refer to that in your style sheet.
For example,
index.html
<div class="city">
<h2>London</h2>
<p>London is the capital of England.</p>
</div>
style.css
.city {
background-color: tomato;
color: white;
border: 2px solid black;
margin: 20px;
padding: 20px;
}
Good job tho! Keep it up