PDA

View Full Version : DIV trouble


Evilution
12-20-2006, 08:32 PM
I currently created a site that can be viewed at http://www.bright.net/marxtoy/index.html The problem I seem to be having is, in the bottom left area, the contact us, about us. I want it to go across the entire bottom of the page. I cant seem to see what I did wrong with the coding and could use some help. Im not looking for a direct answer, but may an explaination on how to understand the code.

johnz
12-20-2006, 08:38 PM
404 Error - Page Not Found
The page you tried was not found. You may have used an outdated link or may have typed the address (URL) incorrectly.

Evilution
12-20-2006, 09:10 PM
Sorry it should be http://www.bright.net/~marxtoy/index.html

johnz
12-20-2006, 09:26 PM
ok first off fix the errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.bright.net%2F~marxtoy%2Findex.html) you have on the page.

then add


width: 100%;


to #siteInfo in your stylesheet

Evilution
12-20-2006, 09:37 PM
I have fixed most of the errors if not all of them on the page now. The only issue that is remaining is the related categories i would like to space the links. How would i go about doing this correctly?

johnz
12-20-2006, 10:10 PM
remove the <br> from after the </li> tags and add this to your stylesheet:

.relatedLinks li {
margin-bottom: 10px;
}



and you still have some other errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.bright.net%2F~marxtoy%2Findex.html)that need to be fixed on your page.

johnz
12-20-2006, 10:45 PM
this is your new stylesheet

/***********************************************/
/* 2col_leftNav.css */
/* Use with template 2col_leftNav.html */
/***********************************************/

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

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: 100%;
}

#navBar{
margin: 0 79% 0 0;
padding: 0px;
background-color: #eeeeee;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}

#content{
float:right;
width: 75%;
margin: 0;
padding: 0 3% 0 0;
}


/***********************************************/
/*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;
}


/************* #breadCrumb styles *************/

#breadCrumb{
font-size: 80%;
padding: 5px 0px 5px 10px;
}


/************** .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;
}


/************* #siteInfo styles ***************/

#siteInfo{
clear: both;
border: 1px solid #cccccc;
font-size: 75%;
color: #cccccc;
margin-top: 0px;
padding-top: 10px;
padding-right: 50px;
padding-bottom: 10px;
padding-left: 10px;
width: 100%;
}
/* negative top margin pulls siteinfo up so its top border overlaps (and thus lines up with)
the bottom border of the navBar in cases where they "touch" */

#siteInfo img{
padding: 4px 4px 4px 0px;
vertical-align: middle;
}


/************* #search styles ***************/

#search{
padding: 5px 0px 5px 10px;
border-bottom: 1px solid #cccccc;
font-size: 90%;
}

#search form{
margin: 0px;
padding: 0px;
}

#search label{
display: block;
margin: 0px;
padding: 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;
}


/************** #advert styles **************/

#advert{
padding: 10px 0px 0px 10px;
font-size: 80%;
border-top: 1px solid #cccccc;
}

#advert img{
display: block;
}


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

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

#headlines p{
padding: 5px 0px 5px 0px;
}
.relatedLinks li {
margin-bottom: 10px;
}


this is your new html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link rel="stylesheet" href="2col_leftNav.css" type="text/css">
</head>
<!-- The structure of this file is exactly the same as 2col_rightNav.html;
the only difference between the two is the stylesheet they use -->
<body>
<div id="masthead">
<h1 id="siteName">Metal Craft Inc. </h1>
<div id="globalNav"> <a href="#">Home</a> | <a href="#">Back</a> |</div>

</div>
<!-- end masthead -->
<div id="content">
<div id="breadCrumb"> <a href="#">breadcrumb</a> / <a href="#">breadcrumb</a> / <a href="#">breadcrumb</a> /</div>
<div class="feature"> <img src="Info.jpg" alt="" width="255" height="200">

<h3>Feature 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>
</div>

<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>
<!--end content -->
<div id="navBar">
<div id="search">
<form action="#">
<label>search</label>
<input name="searchFor" type="text" size="10">
<input name="goButton" type="submit" value="go">
</form>
</div>
<div class="relatedLinks">
<h3>Related Categories</h3><br>
<ul>
<li><a href="#">Welding</a></li>
<li><a href="#">Machining</a></li>
<li><a href="#">Fabrication</a></li>
<li><a href="#">Millwright</a></li>
<li><a href="#">Equipment &amp; Machinery Rebuilds</a></li>
</ul>
<div id="advert"> <img src="" alt="" width="107" height="66"> Ad copy ad copy ad copy. Ad copy ad copy. </div>
</div>
<div id="headlines">

<h3>Headlines</h3>
<p> Headline <a href="#">laser cutter.</a></p>
</div>
</div><!--end navbar -->
<div id="siteInfo"> <img src="" width="44" height="22" alt=""> <a href="#">About Us</a> | <a href="#">Site Map</a> | <a href="#">Privacy Policy</a> | <a href="#">Contact Us</a> | &copy;2006 Metal Craft Inc. </div>

</body>
</html>


all i did was fix the errors you had and added the snipets of code i had posted in my previous posts.

johnz
12-20-2006, 10:47 PM
http://lisr.net/1/index.html

Evilution
12-21-2006, 02:23 AM
I have went over my coding and see the mistakes. I would like to say thank you and wish there was more I could do. Looks like its time to go brush up on some of my skills. Could you point me in the right direction where might be a good place to read up on CSS coding?

johnz
12-21-2006, 12:57 PM
you are welcome.

here is a small collection of useful css links that karinne has put together in the css room.
http://www.htmlforums.com/css/t-resources-for-learning-how-to-use-css-for-layout-86657.html