yet another <div> question

R

Richard

Consider a division with a width of 100%.
Within this division are 3 side by side divisions.
Each division to be 33% width of the main.
.......main.......
.....1.....2.....3
.....................

As in a comparison table format:
<table width =100%>
<tr><td width =33%><td width=33%><td width=33%></tr>
<table>

How does one convert the above to css?
I want the divisions to change in accordance with screen width, not use
fixed positions.
In order to have the proper appearance in accordance with screen size.
 
M

Michael Wilcox

Richard said:
How does one convert the above to css?
I want the divisions to change in accordance with screen width, not
use fixed positions.
In order to have the proper appearance in accordance with screen size.

In body:

<div class="container">
<div class="column">Hello</div>
<div class="column">Hello</div>
<div class="column">Hello</div>
</div>

In head:
<style type="text/css">
..column
{
width: 33%;
float: left;
text-align: center;
}
</style>


How's this look html gurus?
 
R

Richard

<div class="container">
<div class="column">Hello</div>
<div class="column">Hello</div>
<div class="column">Hello</div>

In head:
<style type="text/css">
.column
{
width: 33%;
float: left;
text-align: center;
}
</style>

How's this look html gurus?


Works for me. Thanks.
Figured it was something stupidly simple I was missing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top