Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Here's what I have in the CSS:

CSS
body {
	margin: 0 0 0 0;
	padding: 0 0 0 0;
}

.left {
	width:50%;
	float:left;
	background-color:#000000;
}

.right {
	width:50%;
	float:right;
	background-color:#04F9C8;
}


I have two div classes in HTML.
One labeled left and the other div labeled right.
Posted
Updated 11-Oct-15 17:54pm
v2

1 solution

You can vh for height here like:

CSS
.left {
    width:50%;
    height:100vh;
    float:left;
    background-color:#000000;
}
.right {
    width:50%;
    height:100vh;
    float:right;
    background-color:#04F9C8;
}


vh here actually is 1/100th viewport height.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900