Results 1 to 6 of 6
  1. #1
    Senior Member Toppers's Avatar
    Join Date
    Jan 2011
    Location
    Stevenage
    Posts
    281
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can someone please help with this coding headache!

    Any suggested will be greatly appreciated.
    Been scratching my head with this all afternoon.

    Basically between Nav Bar <div> and Main image <div> there is an unexplainable breaker appearing in the web browser containing a colour that I can't find anywhere in the browser. These two divs should snap together without a gap.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="Description" content="Ballroom and Latin Dance Lessons">
    <meta name="Keywords" content="ballroom, latin, dance, lessons, waltz, foxtrot, dancing, quickstep. jive, sequence, tango">
    <title>Come Dance Website</title>
    <link href="Layout.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    #Container {
    width: 1024px;
    margin-right: auto;
    margin-left: auto;
    margin-top: 10px;
    background-color: #977769;
    }
    #Container #HeaderContainer {
    height: 151px;
    width: 1024px;
    background-color: #000;
    }
    #Container #HeaderContainer #logo {
    background-color: #666;
    height: 150px;
    width: 400px;
    float: left;
    }
    #Container #HeaderContainer #address {
    background-color: #666;
    height: 150px;
    width: 624px;
    float: right;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #FFF;
    line-height: 22px;
    text-align: left;
    word-spacing: 0em;
    letter-spacing: 0em;
    margin: 0px;
    text-indent: 415px;
    vertical-align: text-bottom;
    background-image: url(images/address_banner.png);
    }
    #Container #Navbar {
    background-color: #FEA42C;
    height: 40px;
    width: 1024px;
    }
    #Container #mainimage {
    background-color: #FEA42C;
    height: 500px;
    width: 1024px;
    padding: 0px;
    background-image: url(images/main_bg_image.jpg);
    }
    #Container #mainimage #maintext {
    height: 380px;
    width: 470px;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    line-height: 20px;
    padding-top: 0px;
    padding-right: 60px;
    padding-bottom: 60px;
    padding-left: 25px;
    }
    #Container #footerContainer {
    background-color: #666;
    height: 160px;
    width: 1024px;
    color: #999;
    }
    #Container #seotext {
    background-color: #666;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #999;
    }
    #Container #footerContainer #footerleft {
    background-color: #000;
    float: left;
    width: 1024px;
    height: 150px;
    color: #999;
    text-align: left;
    text-indent: 25px;
    font-size: 18px;
    font-family: Arial, Helvetica, sans-serif;
    }
    .class1 A:link {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #FFF;
    }
    .class1 A:visited {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #FFF;
    }
    .class1 A:active {text-decoration: none}
    .class1 A:hover {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #CCC;
    }

    .class2 A:link {
    text-decoration: underline;
    font-size: 14px;
    }
    .class2 A:visited {
    text-decoration: none;
    font-size: 14px;
    }
    .class2 A:active {
    text-decoration: none;
    font-size: 14px;
    }
    .class2 A:hover {
    text-decoration: underline;
    color: #FFF;
    font: 14;
    }
    </style>
    <script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script><script type="text/javascript">
    </script>

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-21112779-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>

    </head><body bgcolor="#666666" onload="MM_preloadImages('images/home_nav_ro.jpg','images/about_nav_ro.jpg','images/equipment_nav_ro.jpg','images/gallery_nav_ro.jpg','images/contact_nav_ro.jpg')">
    <div id="Container">
    <div id="HeaderContainer">
    <div id="logo"><img src="images/logo.png" width="400" height="150" alt="Aardvark soft play Parties Logo"></div>
    <div id="address"> <br>
    <br>
    <address>Call us today on:</address>
    <address>Tel: 01438 759172</address>
    <address>Mob: 07927 674660</address>
    </div>
    </div>


    <div id="Navbar"><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home nav','','images/home_nav_ro.jpg',1)"><img src="file:///ToppersData/Toppers%20FilingNEW/A/Aardvark%20Soft%20Play/Website/Website/images/home_nav.jpg" alt="home nav" name="home nav" width="205" height="40" border="0" id="home nav"></a><a href="about.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about nav','','images/about_nav_ro.jpg',1)"><img src="file:///ToppersData/Toppers%20FilingNEW/A/Aardvark%20Soft%20Play/Website/Website/images/about_nav.jpg" alt="about nav" name="about nav" width="205" height="40" border="0" id="about nav"></a><a href="equipment.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('equipment nav','','images/equipment_nav_ro.jpg',1)"><img src="file:///ToppersData/Toppers%20FilingNEW/A/Aardvark%20Soft%20Play/Website/Website/images/equipment_nav.jpg" alt="equipment nav" name="equipment nav" width="205" height="40" border="0" id="equipment nav"></a><a href="gallery.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('gallery nav','','images/gallery_nav_ro.jpg',1)"><img src="file:///ToppersData/Toppers%20FilingNEW/A/Aardvark%20Soft%20Play/Website/Website/images/gallery_nav.jpg" alt="gallery nav" name="gallery nav" width="205" height="40" border="0" id="gallery nav"></a><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact nav','','images/contact_nav_ro.jpg',1)"><img src="file:///ToppersData/Toppers%20FilingNEW/A/Aardvark%20Soft%20Play/Website/Website/images/contact_nav.jpg" alt="contact nav" name="contact nav" width="204" height="40" border="0" id="contact nav"></a></div>



    <div id="mainimage">
    <div id="maintext">
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <br>
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud <br>
    <br>
    Exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br>
    <br>
    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit.<br>
    <br>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <br>
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure.<br>
    </p>
    <p>&nbsp;</p>
    <h3>&nbsp;</h3>
    </div>
    </div>



    <div id="footerContainer">
    <div id="footerleft">
    <h5>follow us on... <a href="http://www.facebook.com/profile.php?id=100002371725661" target="_new"><img src="images/Facebook.jpg" width="60" height="60" alt="facebook"></a> </h5>
    <table width="140" border="0">
    <tbody><tr>
    <td width="70" align="center">&nbsp;</td>
    <td width="7align=" center"="">&nbsp;</td>
    </tr>
    </tbody></table>
    </div>

    </div>
    <div id="seotext">Soft Play Parties in stevenage | hitchin | letchworth | welwyn | knebworth | hatfield | hertfordshire | bedfordshire | Bouncy castles | Ball ponds | Special needs equipment | Birthdays | Weddings | Christening | Corporate days| Garden parties
    <br>
    <br>
    <span class="class1">
    <a href="http://www.toppersprint.com" target="_new">websites by toppers print and design limited</a><p></p>

    </span></div>
    </div>

    </body></html>

  2. #2
    djb
    djb is offline
    Senior Member djb's Avatar
    Join Date
    Apr 2010
    Location
    Farnham, Surrey
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Don’t suppose you can get it online and give us a link to it? I’m not clever enough to work it out from that lot!

    Also, if you haven’t already, get the Firebug addon for Firefox - it’s perfect for working out these things.

  3. #3
    Senior Member
    Join Date
    Apr 2011
    Location
    Wilts
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your container colour is #977769, I changed that to your Navbar colour #FEA42C and the bar 'disappeared'.
    Not sure why it is showing the container background, probably a margin value somewhere.

  4. #4
    Moderator Corrosive's Avatar
    Join Date
    May 2010
    Location
    Bristol, UK
    Posts
    980
    Thanks
    18
    Thanked 27 Times in 20 Posts
    Agree with djb. Would be better to see this online somewhere to debug. My initial thoughts are that your opening and closing div tags seem out of balance but that is an educated guess. It would help a lot if you commented your code.

  5. #5
    djb
    djb is offline
    Senior Member djb's Avatar
    Join Date
    Apr 2010
    Location
    Farnham, Surrey
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I put the following in with the styles and it seems to work for me:

    p {
    margin: 0;
    }

    Actually, not sure whether it’s the right or wrong way of doing things but I generally set the padding to 0 for P as well just to reset everything before I muck around with any other styles.
    Last edited by djb; 05-16-2011 at 05:49 PM.

  6. #6
    Moderator Corrosive's Avatar
    Join Date
    May 2010
    Location
    Bristol, UK
    Posts
    980
    Thanks
    18
    Thanked 27 Times in 20 Posts
    Meyer's reset is a good place to start. That way you set your own styles rather then using the defaults; CSS Tools: Reset CSS

Similar Threads

  1. DIY coding?
    By bigdave in forum Website Design Forum:
    Replies: 16
    Last Post: 02-28-2012, 12:40 PM
  2. Facebook Like Button Integration Headache - Help!!
    By Boss Hog in forum Website Coding & Programming Forum:
    Replies: 9
    Last Post: 07-25-2011, 02:07 PM
  3. .PSD Slicing and Coding
    By JamCreations in forum Website Design Forum:
    Replies: 4
    Last Post: 10-28-2009, 12:25 PM
  4. Google Headache!
    By Boss Hog in forum SEO & Online Marketing Forum:
    Replies: 1
    Last Post: 01-23-2009, 10:41 AM
  5. Coding Forum?
    By Xenonsoft in forum GDF Feedback & Help:
    Replies: 8
    Last Post: 01-07-2009, 01:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •