I’m a real beginner at html and css so it will be great if you guys can give me some insight!
I’m currently working on my personal website. What I want to accomplish is something like this… http://gyazo.com/741e08b227cb1e65f985bdd6b707815c (Photoshop)
A colored background with 100% height and width, with centered elements (app icon, app name, app description)
This is what I currently have…
HTML
<section id="app">
<div>
<h2>app</h2>
<p>This is a sample description <br> for an iOS application.<p>
<div>
</section>
CSS
#app {
height: 100vh;
width: 100vw;
background-color: #28D9F9;
}
I know this design might be fairly easy to code, but with my skill set I am having a hard time vertical aligning and horizontal aligning my elements. From poking around other sites with similar designs, I found css called “box-sizing”, but I have no clue how to implement this into my code. If anyone can help, that will be great!
2
Answers
Your css should be like:
try above it is working.
Give parent div to:
display: table;
edit:
HTML:
CSS:
You can check it here:
http://jsfiddle.net/ketan156/22z6vjrx/5/
Pls try this :
http://jsfiddle.net/zj9v81t7/22/