two column layout errors?

liunx

Guest
When I try to make a two column layout (navigation on the right) the navigation does not show at the top right where I want it it just continues down below the left column. I'm new and lost. :)

Here is my html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link rel="stylesheet" href=http://www.webdeveloper.com/forum/archive/index.php/"css/2col.css" type="text/css">
</head>
<body>
<div class="wrapper">
<div id="masthead">
<h1 id="siteName">Site name</h1>
</div>

<div id="content">
<h2 id="pageName">Page Name</h2>

<div class="story">
<h3>Story Title</h3>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie.
Sed aliquam sem ut arcu. Phasellus sollicitudin. Vestibulum condimentum
facilisis nulla. In hac habitasse platea dictumst. Nulla nonummy. Cras quis
libero. Cras venenatis. Aliquam posuere lobortis pede. Nullam fringilla
urna id leo. Praesent aliquet pretium erat. Praesent non odio. Pellentesque
a magna a mauris vulputate lacinia. Aenean viverra. Class aptent taciti
sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.
Aliquam lacus. Mauris magna eros, semper a, tempor et, rutrum et, tortor.
</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie.
Sed aliquam sem ut arcu. Phasellus sollicitudin. Vestibulum condimentum
facilisis nulla. In hac habitasse platea dictumst. Nulla nonummy. Cras quis
libero. Cras venenatis. Aliquam posuere lobortis pede. Nullam fringilla
urna id leo. Praesent aliquet pretium erat. Praesent non odio. Pellentesque
a magna a mauris vulputate lacinia. Aenean viverra. Class aptent taciti
sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.
Aliquam lacus. Mauris magna eros, semper a, tempor et, rutrum et, tortor.
</p>
</div>
</div>

<div id="navBar">
<div id="sectionLinks">
<ul>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Section Link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Section Link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Section Link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Section Link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Section Link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">Section Link</a></li>
</ul>
</div>
</div>

<br />
</div>
</body>
</html>


here is my css:

/***********************************************/
/* HTML tag styles */
/***********************************************/

html{
min-width: 740;
}

body{
font-family: Arial,sans-serif;
color: #333333;
line-height: 1.166;
margin: 0px;
padding: 0px;
}

a:link, a:visited, a:hover {
color: #006699;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}
/* overrides decoration from previous rule for hovered links */

h1, h2, h3, h4, h5, h6 {
font-family: Arial,sans-serif;
margin: 0px;
padding: 0px;
}

h1{
font-family: Verdana,Arial,sans-serif;
font-size: 120%;
color: #334d55;
}

h2{
font-size: 114%;
color: #006699;
}

h3{
font-size: 100%;
color: #334d55;
}

h4{
font-size: 100%;
font-weight: normal;
color: #333333;
}

h5{
font-size: 100%;
color: #334d55;
}

ul{
list-style-type: square;
}

ul ul{
list-style-type: disc;
}

ul ul ul{
list-style-type: none;
}

label{
font: bold 100% Arial,sans-serif;
color: #334d55;
}


/***********************************************/
/* Layout Divs */
/***********************************************/

#masthead{
margin: 0;
padding: 10px 0px;
border-bottom: 1px solid #cccccc;
width: 740px;
}

div#navBar{
width: 230px;
margin: 0 0 0 520px;
padding: 0px;
background-color: #eeeeee;
border-left: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}

div#wrapper{
color: #663;
width: 740px;
margin: 0 auto;
padding: 0;
text-align: left;
}

div#content{
width: 500px;
margin: 0;
padding: 0 3% 0 0;
}


html>body div#content {
/* Correct value for browsers that don't suffer from IE Win's bugs */
margin-left: 12px;
min-height: 800px;
}

/***********************************************/
/*Component Divs */
/***********************************************/

#siteName{
margin: 0px;
padding: 0px 0px 10px 10px;
}


/*************** #pageName styles **************/

#pageName{
padding: 0px 0px 10px 10px;
}


/************* #globalNav styles **************/

#globalNav{
color: #cccccc;
padding: 0px 0px 0px 10px;
white-space: nowrap;
}
/* 'nowrap' prevents links from line-wrapping if there are too many to fit in one line
this will force a horizontal scrollbar if there isn't enough room for all links
remove rule or change value to 'normal' if you want the links to line-wrap */

#globalNav img{
display: block;
}

#globalNav a {
font-size: 90%;
padding: 0px 4px 0px 0px;
}


/************** .feature styles ***************/

.feature{
padding: 0px 0px 10px 10px;
font-size: 80%;
}

.feature h3{
padding: 30px 0px 5px 0px;
text-align: center;
}

.feature img{
float: left;
padding: 0px 10px 0px 0px;
margin: 0 5px 5px 0;
}
/* adjust margins to change separation between the feature image and text flowing around it */


/************** .story styles *****************/

.story{
clear: both;
padding: 10px 0px 0px 10px;
font-size: 80%;
}

.story p{
padding: 0px 0px 10px 0px;
}


/*********** #navBar link styles ***********/

#navBar ul a:link, #navBar ul a:visited {display: block;}
#navBar ul {list-style: none; margin: 0; padding: 0;}

/* hack to fix IE/Win's broken rendering of block-level anchors in lists */
#navBar li {border-bottom: 1px solid #EEE;}

/* fix for browsers that don't need the hack */
html>body #navBar li {border-bottom: none;}


/*********** #sectionLinks styles ***********/

#sectionLinks{
position: relative;
margin: 0px;
padding: 0px;
border-bottom: 1px solid #cccccc;
font-size: 90%;
}

#sectionLinks h3{
padding: 10px 0px 2px 10px;
}

#sectionLinks a:link{
padding: 2px 0px 2px 10px;
border-top: 1px solid #cccccc;
width: 100%;
voice-family: "\"}\"";
voice-family:inherit;
width: auto;
}

#sectionLinks a:visited{
border-top: 1px solid #cccccc;
padding: 2px 0px 2px 10px;
}

#sectionLinks a:hover{
border-top: 1px solid #cccccc;
background-color: #dddddd;
padding: 2px 0px 2px 10px;
}


/*********** .relatedLinks styles ***********/

.relatedLinks{
margin: 0px;
padding: 0px 0px 10px 10px;
font-size: 90%;
}

.relatedLinks h3{
padding: 10px 0px 2px 0px;
}


/************** #headlines styles **************/

#headlines{
margin: 0px;
padding: 10px 0px 20px 10px;
font-size: 80%;
}

#headlines p{
padding: 5px 0px 5px 0px;
}Screenshot:
<!-- m --><a class="postlink" href="http://www.eaglesnestministries.com/images/shot.jpgHello">http://www.eaglesnestministries.com/ima ... t.jpgHello</a><!-- m -->!

Play with position:absolute and top:0px (or what you want) in the css for your navBar div.

Regards PJThank you. :)You're welcome! ;)
 
Back
Top