Jump to content

Its all going wrong again :(


chownsy
 Share

Recommended Posts

This is how we left the code last time, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="description" content="A Chowns Agricultural Services, Offering contracting services within Worcestershire and Warwickshire" /><meta name="keywords" content="Chowns, Contracting, services, ploughing, farming, tractor, driver, fencing, topping, muck, spreading" /><title>A Chowns Agricultural Services</title></head> <body> <div id="container" style="width:100%"> <div id="header"> <h1>A Chowns Agricultural Services</h1></div> <div id="menu" style="height:200px;width:10%;float:left;"><p><b>Home</b><br /></p><p><b>About</b><br /></p><p><b>Services Offered</b><br /></p><p><b>Gallery</b><br /></p><p><b>Contact</b></p></div> <div id="Contact-details" style="height:200px;width:10%;float:right;"><p>contact details here</p></div> <div id="content" style="margin-left:auto;margin-right:auto;height:200px;width:75%;"><p>Content goes here</p></div> </div> </body> </html> Done the following changes <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="description" content="A Chowns Agricultural Services, Offering contracting services within Worcestershire and Warwickshire" /><meta name="keywords" content="Chowns, Contracting, services, ploughing, farming, tractor, driver, fencing, topping, muck, spreading" /><title>A Chowns Agricultural Services</title></head> <body> <div id="container" style="width:100%"> <div id="header"> <h1>A Chowns Agricultural Services</h1></div> <div id="marquee"><h2><marquee>Welcome to A Chowns Agricultural Services</marquee></h2></div> <div id="menu" style="height:200px;width:10%;float:left;"> <form><input type="button" value="Home" title="Go to Home Page" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="About" title="Visit our information page" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="Services Offered" title="See what services we have to offer" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="Gallery" title="Examples of work we have done" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="Contact" title="Use our contact form" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form> </div> <div id="Contact-details" style="height:200px;width:10%;float:right;"><p>contact details here</p></div> <div id="content" style="margin-left:auto;margin-right:auto;height:200px;width:75%;"><p>Content goes here</p></div> <div id="footer> <p>blah blah blah</p></div> </div> </body> </html> and with CSS body{background:#800000;width:100%;} h1{background-color:#FFFFCC;margin-left:auto;margin-right:auto;width:80%;border:10px solid black;padding:1%;color:#800000;text-align:center;font-family:"arial";} h2{margin-left:auto;margin-right:auto;width:90%;color:#FFFFCC;text-align:center;font-family:"arial";} form{background-color:#FFFFCC;margin:55;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} p{background-color:#FFFFCC;margin:55;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} Validator hates me, says 16 errors, I know its because I have now put in what seems to be JavaScript and the marquee scroll banner. My main concern is getting the basic template layout done as I have a lot to do. I could post all of what I want doing and someone just write it for me, but I wont learn. The main issues I want to sort on this are: 1. side navigation bar, the buttons I want to be the whole bordered area2, Want space between the buttons3. Want the marquee to alternate its behaviour4. want the footer to show up first and then be in the middle5. the right column to have a space between the right edge and the box finishing. Can someone guide me again please. Also is this site going to be SEO optimised or will i need to do other things?

Edited by chownsy
Link to comment
Share on other sites

You don't use a form for navigation, you have unused margins without unit, the footer id does not finish with double quote, remove 100% width on body to lose scrollbar, and position right sidebar correctly, and use javascript to insert marquee so it passes validation.

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Description" content="A Chowns Agricultural Services, Offering contracting services within Worcestershire and Warwickshire" /><meta name="Keywords" content="Chowns, Contracting, services, ploughing, farming, tractor, driver, fencing, topping, muck, spreading" /><title>A Chowns Agricultural Services</title> <script type="text/javascript"><!--//window.onload=function(){parent_elem = document.getElementById("marquee")child_elem = parent_elem.getElementsByTagName("h2"); current_innerH = child_elem[0].innerHTML; child_elem[0].innerHTML="<marquee>"+current_innerH+"</marquee>";}//--></script>   <style type="text/css"> html {overflow-y: scroll; } /* keeps vertical scroll in view prevent page jumping left to right */ body{background:#800000;} h1{background-color:#FFFFCC;margin-left:auto;margin-right:auto;width:80%;border:10px solid black;padding:1%;color:#800000;text-align:center;font-family:"arial";} h2{margin-left:auto;margin-right:auto;width:90%;color:#FFFFCC;text-align:center;font-family:"arial";} form{background-color:#FFFFCC;/*margin:55px; corrected dsonesuk*/border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} p{background-color:#FFFFCC;/*margin:55px;corrected dsonesuk*/border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} #menu ul, #menu li {padding:0; margin:0; text-indent:0; list-style-type: none;}#menu ul {}#menu li {margin: 4px 0;background-color: #ffc;}#menu li a {color:#800000; font-family:Arial; font-weight:bold; text-decoration:none; display:block; text-align:center; border:5px solid black; font-family: Arial; padding:1%;}  </style>  </head> <body> <div id="container" style="width:100%"> <div id="header"> <h1>A Chowns Agricultural Services</h1></div> <div id="marquee"><h2>Welcome to A Chowns Agricultural Services</h2></div>   <div id="menu" style="height:200px;width:10%;float:left;"> <ul><li><a href="/" title="Go to Home Page">Home</a></li><li><a href="about.html" title="Visit our information page">About</a></li><li><a href="services.html" title="See what services we have to offer">Services Offered</a></li><li><a href="gallery.html" title="Examples of work we have done">Gallery</a></li><li><a href="contact.html" title="Use our contact form">Contact</a></li></ul>  <!--<form><input type="button" value="Home" title="Go to Home Page" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="About" title="Visit our information page" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="Services Offered" title="See what services we have to offer" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="Gallery" title="Examples of work we have done" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form><form><input type="button" value="Contact" title="Use our contact form" style="color:#800000; Font-Family:Arial; font-weight:bold"/></form>--> </div> <div id="Contact-details" style="height:200px;width:10%;float:right;"><p>contact details here</p></div> <div id="content" style="margin-left:auto;margin-right:auto;height:200px;width:75%;"><p>Content goes here</p></div> <div id="footer"><!-- correct by dsonesuk --> <p>blah blah blah</p></div>   </div> </body> </html>

Edited by dsonesuk
Link to comment
Share on other sites

Hmm that's an option. Never thought of restricting the fluidity. I will give it a go. Im coding this all to show neatly on a 1080p resolution screen, Is there a way i check this on lower resolutions with out having to change my screen resolution as then it messes up my 3 screen layout each time i change the resolution. I know i have had help, but this will be the 1st website I have coded from scratch and not used a single editor like dreamweaver on it.

Link to comment
Share on other sites

How do I align the body central. I have set min and max px for the site but when i make it larger (eyefinity sizing) it goes to the left and not staying in the middle of the page. Never mind, sorted it with margin-left:auto;margin-right:auto;

Edited by chownsy
Link to comment
Share on other sites

Im having some trouble with the following things: 1. when i resize to a smaller size, the main content moves behind the 2 side bars2. the main picture does not resize with the page, it comes out of the box its put in. here is the code so far (also can you check if this will be SEO optimised at all?) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Description" content="A Chowns Agricultural Services, Offering contracting services within Worcestershire and Warwickshire" /><meta name="Keywords" content="Chowns, Contracting, services, ploughing, farming, tractor, driver, fencing, topping, muck, spreading" /><title>A Chowns Agricultural Services</title> <script type="text/javascript"><!--//window.onload=function(){parent_elem = document.getElementById("marquee")child_elem = parent_elem.getElementsByTagName("h2"); current_innerH = child_elem[0].innerHTML; child_elem[0].innerHTML="<marquee>"+current_innerH+"</marquee>";}//--></script> </head> <body> <div id="container" style="width:100%"> <div id="header"> <h1>A Chowns Agricultural Services</h1></div> <div id="marquee"><h2>We offer a whole range of services, Should one be listed dont hesitate to enquire as we may be able to offer it!</h2></div> <div id="menu" style="width:250px;float:left;"> <ul><li><a href="home.html" title="Go to Home Page">Home</a></li><li><a href="about.html" title="Visit our information page">About</a></li><li><a href="services.html" title="See what services we have to offer">Services Offered</a></li><li><a href="gallery.html" title="Examples of work we have done">Gallery</a></li><li><a href="contact.html" title="Use our contact form">Contact form</a></li></ul> </div> <div id="Contact-details" style="width:250px;float:right;"><h3>Address:<br/>Andrew Chowns <br/>28 Oak Tree Lane <br/>Cookhill <br/>Alcester <br/>Warwickshire <br/>B49 5LH <br/> </h3> <h3> Home Telephone: <br/>01527 894031<br/>Mobile Telephone: <br/>07908490637<br/> </h3> <h3> Email: <br/> <a href="mailto:achownsagriculturalcontractor@hotmail.co.uk?subject=Email from www.achownscontracting.co.uk">Click to Email me</a> </h3> <h3> <a href="http://www.naac.co.uk" target="_blank"><img src="pictures/logo/naac.png" alt="NAAC"/></a> </h3> </div> <div id="content" style="margin-left:auto;margin-right:auto;height:700px;width:900px;"> <h4><img src="pictures/logo/tractor.png" width="656" height="492" alt="Main Image"/> <br/> Andrew started work in the farming sector in the year of 1997/98 and progressed to become <br/>knowledgeable in farming via his training at Hindlip college. He developed his skills needed <br/>to become a contractor to best serve the sector noticing that there was a demand for the services <br/>he offers. In 2005 he bought his 1st tractor and trailer and has progressed to own a few implements. <br/>With work progressing Andrew has now purchased a Case CVX1145 to be able to offer more services.<br/>Andrew is based on the Worcestershire/Warwickshire border and tries to cover as much as both <br/>counties as possbile.<br/> </h4> </div> <div id="footer" style="width:600px;margin-left:auto;margin-right:auto;"> <p>Designed and coded by Chownsy 2012</p></div> </div> </body> </html> CSS file:html {overflow-y: scroll;} body{background:#800000;margin-left:auto;margin-right:auto;max-width:1500px;min-width:1000px;} h1{background-color:#FFFFCC;margin-left:auto;margin-right:auto;width:80%;border:10px solid black;padding:1%;color:#800000;text-align:center;font-family:"arial";} h2{margin-left:auto;margin-right:auto;width:90%;color:#FFFFCC;text-align:center;font-family:"arial";} h3{background-color:#FFFFCC;margin-top:0px;margin-bottom:20px;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} h4{background-color:#FFFFCC;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} p{background-color:#FFFFCC;margin-left:auto;margin-right:auto;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} #menu ul, #menu li {padding:0; margin:0; text-indent:0; list-style-type: none;}#menu ul {}#menu li {margin-top:0px;margin-bottom:15px;background-color: #ffc;}#menu li a {color:#800000; font-family:Arial; font-weight:bold; text-decoration:none; display:block; text-align:center; border:5px solid black; font-family: Arial; padding:1%;}

Link to comment
Share on other sites

As you are using fixed widths for side bars and main content for a fluid layout!, what exactly did you expect!, one of these need to be fluid, which in this case will be '#content', also the image inside of it needs to be fluid also (percentage width value) apply margin: 0 300px; to #content, and remove width and height.

Link to comment
Share on other sites

think this is what you meant: CSS: html {overflow-y: scroll;} body{background:#800000;margin-left:auto;margin-right:auto;max-width:1500px;min-width:1000px;} h1{background-color:#FFFFCC;margin-left:auto;margin-right:auto;width:80%;border:10px solid black;padding:1%;color:#800000;text-align:center;font-family:"arial";} h2{margin-left:auto;margin-right:auto;width:90%;color:#FFFFCC;text-align:center;font-family:"arial";} h3{background-color:#FFFFCC;margin-top:0px;margin-bottom:20px;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} h4{background-color:#FFFFCC;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} p{background-color:#FFFFCC;margin-left:auto;margin-right:auto;border:5px solid black;padding:1%;text-align:center;font-family:"arial";color:#800000;} #menu ul, #menu li {padding:0; margin:0; text-indent:0; list-style-type: none;}#menu ul {}#menu li {margin-top:0px;margin-bottom:15px;background-color: #ffc;}#menu li a {color:#800000; font-family:Arial; font-weight:bold; text-decoration:none; display:block; text-align:center; border:5px solid black; font-family: Arial; padding:1%;}#content {margin-top:0;margin-left:300px;margin-right:300px;} Home: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Description" content="A Chowns Agricultural Services, Offering contracting services within Worcestershire and Warwickshire" /><meta name="Keywords" content="Chowns, Contracting, services, ploughing, farming, tractor, driver, fencing, topping, muck, spreading" /><title>A Chowns Agricultural Services</title> <script type="text/javascript"><!--//window.onload=function(){parent_elem = document.getElementById("marquee")child_elem = parent_elem.getElementsByTagName("h2"); current_innerH = child_elem[0].innerHTML; child_elem[0].innerHTML="<marquee>"+current_innerH+"</marquee>";}//--></script> </head> <body> <div id="container" style="width:100%"> <div id="header"> <h1>A Chowns Agricultural Services</h1></div> <div id="marquee"><h2>We offer a whole range of services, Should one not be listed dont hesitate to enquire as we may be able to offer it!</h2></div> <div id="menu" style="width:250px;float:left;"> <ul><li><a href="home.html" title="Go to Home Page">Home</a></li><li><a href="about.html" title="Visit our information page">About</a></li><li><a href="services.html" title="See what services we have to offer">Services Offered</a></li><li><a href="gallery.html" title="Examples of work we have done">Gallery</a></li><li><a href="contact.html" title="Use our contact form">Contact form</a></li></ul> </div> <div id="Contact-details" style="width:250px;float:right;"><h3>Address:<br/>Andrew Chowns <br/>28 Oak Tree Lane <br/>Cookhill <br/>Alcester <br/>Warwickshire <br/>B49 5LH <br/> </h3> <h3> Home Telephone: <br/>01527 894031<br/>Mobile Telephone: <br/>07908490637<br/> </h3> <h3> Email: <br/> <a href="mailto:achownsagriculturalcontractor@hotmail.co.uk?subject=Email from www.achownscontracting.co.uk">Click to Email me</a> </h3> <h3> <a href="http://www.naac.co.uk" target="_blank"><img src="pictures/logo/naac.png" alt="NAAC"/></a> </h3> </div> <div id="content"> <h4><img src="pictures/logo/tractor.png" width="656" height="492" alt="Main Image"/> <br/> Andrew started work in the farming sector in the year of 1997/98 and progressed to become <br/>knowledgeable in farming via his training at Hindlip college. He developed his skills needed <br/>to become a contractor to best serve the sector noticing that there was a demand for the services <br/>he offers. In 2005 he bought his 1st tractor and trailer and has progressed to own a few implements. <br/>With work progressing Andrew has now purchased a Case CVX1145 to be able to offer more services.<br/>Andrew is based on the Worcestershire/Warwickshire border and tries to cover as much as both <br/>counties as possbile.<br/> </h4> </div> <div id="footer" style="width:600px;margin-left:auto;margin-right:auto;"> <p>Designed and coded by Chownsy 2012</p></div> </div> </body> </html> Only thing with this is the picture still does not have fluid sizing. Please slap me and tell me where i've messed up.

Link to comment
Share on other sites

As you are using fixed widths for side bars and main content for a fluid layout!, what exactly did you expect!, one of these need to be fluid, which in this case will be '#content', also the image inside of it needs to be fluid also (percentage width value) apply margin: 0 300px; to #content, and remove width and height.
Link to comment
Share on other sites

my minds gone blank on me, you mean like this: <img src="pictures/logo/achownscasecvx1145.png" width="auto" alt="A Chowns Agricultural contractor main tractor image"/> <br/> If you do then it dont work as when i hit that, the picture goes back to its full size and remains that size

Link to comment
Share on other sites

Let me explain, yet! again, this time with slap at back of head

As you are using fixed widths for side bars and main content for a fluid layout!, what exactly did you expect!, one of these need to be fluid, which in this case will be '#content', also the image inside of it needs to be fluid also (percentage width value) apply margin: 0 300px; to #content, and remove width and height.
Link to comment
Share on other sites

Okay im getting somewhere with my site <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Description" content="A Chowns Agricultural Services, Offering contracting services within Worcestershire and Warwickshire" /><meta name="Keywords" content="Chowns, Contracting, services, ploughing, farming, tractor, driver, fencing, topping, muck, spreading" /><title>A Chowns Agricultural Services</title> <script type="text/javascript"><!--//window.onload=function(){parent_elem = document.getElementById("marquee")child_elem = parent_elem.getElementsByTagName("h2"); current_innerH = child_elem[0].innerHTML; child_elem[0].innerHTML="<marquee>"+current_innerH+"</marquee>";}//--></script> </head> <body> <div id="container" style="width:100%"> <div id="header"> <h1>About A Chowns Agricultural services</h1></div> <div id="marquee"><h2>We offer a whole range of services, Should one not be listed dont hesitate to enquire as we may be able to offer it!</h2></div> <div id="menu" style="width:250px;float:left;"> <ul><li><a href="home.html" title="Go to Home Page">Home</a></li><li><a href="about.html" title="Visit our information page">About</a></li><li><a href="services.html" title="See what services we have to offer">Services Offered</a></li><li><a href="gallery.html" title="Examples of work we have done">Gallery</a></li><li><a href="contact.html" title="Use our contact form">Contact form</a></li></ul> </div> <div id="Contact-details" style="width:250px;float:right;"><h3>Address:<br/>Andrew Chowns <br/>28 Oak Tree Lane <br/>Cookhill <br/>Alcester <br/>Warwickshire <br/>B49 5LH <br/> </h3> <h3> Home Telephone: <br/>01527 894031<br/>Mobile Telephone: <br/>07908490637<br/> </h3> <h3> Email: <br/> <a href="mailto:achownsagriculturalcontractor@hotmail.co.uk?subject=Email from www.achownscontracting.co.uk">Click to Email me</a> </h3> <h3> <a href="http://www.naac.co.uk" target="_blank"><img src="pictures/logo/naac.png" alt="NAAC Registered"/></a> </h3> </div> <div id="content"> <h4><ul><li><a href="fencing.html" title="Fencing gallery"><img src="pictures/logo/naac.png" alt="NAAC Registered"/></a></li><li><a href="hedgecutting.html" title="Hedgecutting Gallery">Hedge Cutting</a></li><li><a href="ploughing.html" title="Ploughing Gallery">Ploughing</a></li><li><a href="baling.html" title="Baling Gallery">Baling</a></li><li><a href="trailer.html" title="Trailer Gallery">Trailer</a></li><li><a href="tractor.html" title="Tractor Gallery">Tractor</a></li><li><a href="mowing.html" title="Mowing Gallery">Mowing</a></li><li><a href="topping.html" title="Topping gallery">Topping</a></li><li><a href="harrowing.html" title="Harrowing gallery">Harrowing</a></li><li><a href="fertilising.html" title="Fertilising Gallery">Fertilising</a></li></ul> </h4> </div> <div id="footer" style="width:600px;margin-left:auto;margin-right:auto;"> <h5>Designed and coded by Chownsy 2012</h5> </div> </div> </body> </html> Problems i now need to overcome with out ruining SEO optimisation: 1. Wanting to make these links into a grid layout (pictures will be used as the clickable target, I have put an example picture in place but not got the grid alignment, will this be done with a table)2. Once they get onto that page i want to make a picture gallery in grid format of small pictures tha when clicked take you to a larger picture that pops out of the page, Can a javascript popup be used for this?) I will then finally need 1 more peice of help i think and that is with a contact form but I will get onto that when im working on that page.

Link to comment
Share on other sites

Anyone? Problems i now need to overcome with out ruining SEO optimisation: 1. Wanting to make these links into a grid layout (pictures will be used as the clickable target, I have put an example picture in place but not got the grid alignment, will this be done with a table)2. Once they get onto that page i want to make a picture gallery in grid format of small pictures tha when clicked take you to a larger picture that pops out of the page, Can a javascript popup be used for this?) I will then finally need 1 more peice of help i think and that is with a contact form but I will get onto that when im working on that page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...