Solved

On going body column layout

Posted on 2013-05-17
6
170 Views
Last Modified: 2013-05-17
I have been having a problem every time i try to make 3 columns float side by side. I start with dimensions that should work,
but never do. I adjust them until they finally line up side by side. I do not see how, but it works.
I have finally decided to get to the bottom of this and find what i am doing wrong.
Here is the page that does not work http://roofgenius.com/test.asp
body width 721px so the side adds are close to the table
table 461 px
add images 120px each + 10px margins each= 260px
 
  total 461
        260
        ----
        721
            The head portion is copied from a page I paid a coder to create and it works.
            What am i doing wrong ?
0
Comment
Question by:isnoend2001
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39174717
See the list of your mistake as you are wrote above you are using 120px for both sidebar but:

.bodywidth {
    width: 701px;
}

.leftcolumn {
    float: left;
    margin-right: 5px;
    width: 130px;
}
.rightColumn {
    float: left;
    margin-left: 5px;
    width: 130px;
}

Open in new window


Now your tables are not in centercolumn
<div class="centercolumn">


<h3>What size roofing nails to use</h3>
</div>

Open in new window

0
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39174744
See this example what you want is:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type= "text/css">
table.NailTable {
	font-family: verdana,arial,sans-serif;
	width: 460px;
	font-size:11px;
	color:#333333;/*black*/
	border-width: 1px;
	border-color: #666666;/*dark gray */
	border-collapse: collapse;
	margin: auto;
}
table.NailTable th {
	border-width: 1px;
	padding: 4px;
	border-style: solid;
	border-color: #0066ff; /*blue */
	background-color: #f0f0f0;/*light gray */
}
table.NailTable td {
    height: 20px;
	border-width: 1px;
	padding: 2px;
	border-style: solid;
	border-color: #666666; /*dark gray */
	background-color: #ffffff;/*white */
}
table.NailTable .leftcol th{
width: 240px;
text-align: center;}

h1 { color:#000099;
	font:24px/22px Arial, Helvetica, sans-serif;
    font-weight: 600;
	text-align:center;
	}
h2 { font-size: 20px;
 font-weight: bold;
  text-align: center; }	
	
h3 { font-size: 16px;
 font-weight: bold;
  text-align: center; }
  
h4 { font-size: 11px;
 font-weight: bold;
  text-align: center; }
  
  
 .bodywidth{
 width: 761px; 
  } 
 .rightColumn{ 
 width: 120px; 
 float: left;
 margin-left:10px;
  	}
	.leftcolumn{
	width: 120px;
	float: left;
	margin-right:10px;
	
	 }
	 .centercolumn{
	 width: 461px;
	 float: left;
	 margin:0px auto;
	  }
</style>
</head>
<body>
<div class="bodywidth">
<div class="leftcolumn">
<img src="http://roofgenius.com/images/_TallAdRight.jpg" alt="" border="0" height="609" width="120">
</div><!--rightcolumn-->

<div class="centercolumn">


<h3>What size roofing nails to use</h3>

<table class="NailTable">
<caption><h3>Composition Shingles</h3></caption>
<tbody><tr>
	<th class="leftcol" rowspan="2"><h4>Comp Shingles</h4></th>
	<th colspan="4"><h4>Sheathing Thickness</h4></th>
	
	
</tr>
<tr>
	<th><h4>3/8"</h4></th>
	<th><h4>1/2"</h4></th>
	<th><h4>5/8"</h4></th>
	<th><h4>3/4"</h4></th>
	
	
</tr>
<tr>
	<td><h4>3-Tab comp shingles (Bare sheathing</h4></td>
	<td style="text-align: center">1"</td>
	<td style="text-align: center">1"</td>
	<td style="text-align: center">1"</td>
	<td style="text-align: center">1"</td>
	
	
</tr>
<tr>
	<td>Dimensional comp shingles (Bare sheathing)</td>
	<td style="text-align: center">1"</td>
	<td style="text-align: center">1-1/4"</td>
	<td style="text-align: center">1-1/4"</td>
	<td style="text-align: center">1-1/4"</td>
	
</tr>
<tr>
	<td>3-Tab comp shingles over 3 Tab comp shingles</td>
	<td style="text-align: center">1-1/4"</td>
	<td style="text-align: center">1-1/4"</td>
	<td style="text-align: center">1-1/4"</td>
	<td style="text-align: center">1-1/2"</td>	
</tr>
<tr>
	<td>Dimensional comp shingles over 3 Tab</td>
	<td style="text-align: center">1-1/4"</td>
	<td style="text-align: center">1-1/2"</td>
	<td style="text-align: center">1-1/2"</td>
	<td style="text-align: center">1-1/2"</td>	
</tr>
</tbody></table>
<br>

<table class="NailTable">
<caption><h3>Wood Shakes(minimum 3/4 " sheathing)</h3></caption>
<tbody><tr>
	<th class="leftcol">Wood Shakes</th>
	<th class="leftcol">Nail Type</th>
	<th class="leftcol">Minimum Length</th>
	</tr><tr>
	<td>18" Straight Split</td>
	<td style="text-align: center">5d Box</td>
	<td style="text-align: center">1-3/4"</td>	
	</tr><tr>
	<td>
	18" and 24" Handsplit and Resawn 
	</td>
	<td style="text-align: center">6d Box</td>
	<td style="text-align: center">2"</td>
	</tr>
	<tr><td>
	24" Tapersplit</td> 
	<td style="text-align: center">5d Box</td>
	<td style="text-align: center">1-3/4"</td>
	</tr><tr>
	<td>18" and 24" Tapersawn</td>
	<td style="text-align: center">6d Box</td>
	<td style="text-align: center">2"</td>
	</tr>	
	</tbody></table>
	<br>
	<table class="NailTable">
<caption><h3>Wood Shingles(minimum 3/4 " sheathing)</h3></caption>
<tbody><tr>
	<th class="leftcol">Wood Shingles</th>
	<th class="leftcol">Nail Type</th>
	<th class="leftcol">Minimum Length</th>
	</tr><tr>
	<td>18" Straight Split</td>
	<td style="text-align: center">3d Box</td>
	<td style="text-align: center">1-1/4"</td>	
	</tr><tr>
	<td>
	18" and 24" Handsplit and Resawn 
	</td>
	<td style="text-align: center">4d Box</td>
	<td style="text-align: center">1-1/2"</td>
	</tr>
	</tbody></table>
	</div><!--centercolumn-->
	<div class="rightColumn">
<img src="http://roofgenius.com/images/_TallAd2.jpg" alt="" border="0" height="609" width="120">
</div><!--leftcolumn-->
	 <!--bodywidth-->   
  

</body>
</html>

Open in new window

0
 

Author Comment

by:isnoend2001
ID: 39174748
Thanks agadishdulal i do not understand your answer
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 

Author Closing Comment

by:isnoend2001
ID: 39174835
Thanks
that works I will have to examine your code to see what i was doing wrong.
How do i center all 3 columns in the page ?
0
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39175334
Update your style sheet:

.bodywidth {
    width: 701px;
    margin:0 auto;

}

Open in new window

0
 

Author Comment

by:isnoend2001
ID: 39175373
Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
text on slider doesn't resize nicely 5 57
highcharts wont fix inside a bootstrap modal window 6 48
Custom Form Design to Match this example 1 22
div to fit another div 8 22
"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question