ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sometimes I get so immersed in complex nested <div>s, that I forget the simple basics!
Suppose I have a web page where I want to position a blog post title about 45% down from the top of the page.
Nothing above the title, no images, no nothing, just empty space.
What's the best practice for creating that space?
My first though was:
<h1 style="margin-top: 12em;">Title here</h1>
(Not trying to use exact measurement. I just wanted to emphasize a large amount of room)
use vh for percent of window height:
<h1 style="margin-top: 45vh;">Title here</h1>