Results 1 to 2 of 2
Jul 12, 2011, 23:07 #1
Top Bottom Centering of Landing Page
I've been asked to create a landing page for a new site and to have it be centered top to bottom for viewing on larger monitors. It kind of makes sense since the page is just a large img w/ an email form element.
And though I can do this easily with margin: 0px, auto; - this doesn't to the job for top to bottom. What I've read is browsers still default top margin to 0.
Another twist is that the form element has to be placed relative to the img in the bottom right hand corner ... so relative vs absolute placement is question there.
The url is here: Smitten on Paper - Coming Soon!
And my markup below:
A part of my question here is about HTML5 (this will be an html5 site) with it and larger monitors being on the upswing, I'm wondering what the most current best practice is in this situation.
<title>Smitten on Paper - Coming Soon!</title>
margin: 0px auto;
border: 1px solid #900;
font-family: Verdana, Arial, Helvetica, sans-serif;
<img src="images/landingpage.png" alt="" >
<form name="emailform" action="email.php" method="post" >
<input type="text" name="email" id="email">
<input type="submit" value="Submit" id="submit">
Jul 12, 2011, 23:16 #2
- Join Date
- Mar 2009
- Melbourne, AU
- 389 Post(s)
- 5 Thread(s)
There are plenty of ways to do this, such as described here:
Easy Vertical Centering with CSS
Wrap everything is a container and follow the directions in that article. Post back if you have questions!