how can you vertical align in css?

tdeath101

New Member
hello, i am currently making a web portfolio and im having a small issue. the website is k2cforce.com and appearently i can only center it horizontally and not vertically, can anyone help out?
 
there are about fifteen billion different ways you could do this. do you understand the box model? margin, padding, border, etc? i'd read up on that and all of the attributes that come with it.

#leftcontent {
margin-left: 10px;
margin-bottom: 20px;
}

this for example will keep the id leftcontent spaced 10px from the left and 20 from the bottom. you can also do:

#leftcontent {
margin: 20px;
}

this will space all sides evenly at 20px

#leftcontent {
margin: (10px, 20px, 30px, 5px)
}

this will specify each space clockwise, starting from top (top at 10px, 20 at right, 30 bottom and 5 left)

margin: auto will automatically space evenly on both sides, which is my personal favorite way to do it.

this barely scratches the surface on ways to position things. like i said, reading up on the box model will bring a ton of clarity to you. web design is one thing you don't want to take the easy way out of, it is best to put in the hours and learn it 100%
 
Last edited:
no no i understand that.. but my problem is that i want it to be centered top-bottom wise.. so when people with high resolutions view my site, it wont appear top center, but instead, center center.
 
Back
Top