quadrant6
12-23-2002, 08:41 AM
How do I (with this code below) get the div elements to sit side by side, forming a 3-column layout. I know there are plenty of tuts around and examples of how to do a 3 column layout but i am learning the basics and would appreciate it if someone could point out the simplest way to do this seemingly basic task?
:)
Code below
<html>
<head>
<title>CSS Test</title>
<style>
.1{
border: 1px solid #FF6666;
background-color: #FFCCCC;
height: 30px;
width: 190px;
}
.2{
border: 1px solid #FF6666;
background-color: #FFCCCC;
height: 30px;
width: 100%;
}
.3{
border: 1px solid #FF6666;
background-color: #FFCCCC;
height: 30px;
width: 190px;
}
</style>
</head>
<body>
<div class="1">
1
</div>
<div class="2">
2
</div>
<div class="3">
3
</div>
</body>
</html>
:)
Code below
<html>
<head>
<title>CSS Test</title>
<style>
.1{
border: 1px solid #FF6666;
background-color: #FFCCCC;
height: 30px;
width: 190px;
}
.2{
border: 1px solid #FF6666;
background-color: #FFCCCC;
height: 30px;
width: 100%;
}
.3{
border: 1px solid #FF6666;
background-color: #FFCCCC;
height: 30px;
width: 190px;
}
</style>
</head>
<body>
<div class="1">
1
</div>
<div class="2">
2
</div>
<div class="3">
3
</div>
</body>
</html>