Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

On going body column layout

Posted on 2013-05-17
6
Medium Priority
?
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

618 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