Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I know this is something fairly easy, but for some reason I can't get my page to divide evenly 50/50 vertically. I have my CSS external from my HTML. Below is my CSS code. Any help would greatly appreciated!
Thank you!
Lanie
h1
{

width: 50%;
padding: 10px;
margin: 0;
text-align: center;

}
h2
{
float: left;
width: 50%;
padding: 10px;
margin: 0;
text-align: center;

}
h3
{
float: right;
width: 50%;
padding: 10''
px;
margin: 0;
text-align: center;

}
#a1_side
{
float: left;
width: 50%;
padding: 20px;
margin: 0;
text-align: center;

}
#a2_side
{
float: right;
width: 50%;
padding: 20px;
margin: 0;
text-align: center;

}
Posted

1 solution

See and adapt:
XML
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Split 50/50 Vertically</title>
<style>
div {
float: left;
width: 50%;
}
</style>
</head>
<div style="background-color:#9F6">left</div>
<div style="background-color:#F60">right</div>
<body>
</body>
</html>
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Jul-15 10:05am    
5ed.
—SA
Peter Leow 16-Jul-15 11:19am    
Thank you, Sergey.

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