treehouse : what would you like to learn today?
Web Design Web Development iOS Development

CSS Iphone, Ipad, Laptop

  • Hello,

    I am creating a website http://test.hdwebdesigns.co.uk/Nitin/ as you'll notice the right hand side of the footer has a blank area and doesnt go fully across the screen (even though the attributes are set at 100%).

    I need to stretch the footer all away across the page for the devices Ipad, Iphone and normal computer.

    Can anyone help me out?

  • Try taking the padding right and left off of the div #templatemo_footer

  • here I tried to clean up your css code a little ... on a lot of your stuff you had width 200% and unnecessary padding applied

      /*
    

    Credit: http://www.templatemo.com */

    .contentmain { font-size: 16px; }

    body { margin: 0; padding: 0; line-height: 1.5em; font-family: Helvetica; font-size: 12px; color: #353535; background: #fff url(images/templatemo_body.jpg) repeat-x top; }

    h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }

    a:link, a:visited { color: #000000; text-decoration: none; font-weight: normal; } a:active, a:hover { color: #000000; text-decoration: underline; }

    p { margin: 0px; padding: 0px; }

    img { margin: 0px; padding: 0px; border: none; }

    .cleaner { clear: both; width: 100%; height: 0px; font-size: 0px; }

    .margin_bottom_10 { clear: both; width: 100%; height: 10px; font-size: 1px; } .margin_bottom_20 { clear: both; width: 100%; height: 20px; font-size: 1px; } .margin_bottom_30 { clear: both; width: 100%; height: 30px; font-size: 1px; } .margin_bottom_40 { clear: both; width: 100%; height: 40px; font-size: 1px; } .margin_bottom_50 { clear: both; width: 100%; height: 50px; font-size: 1px; } .margin_bottom_60 { clear: both; width: 100%; height: 60px; font-size: 1px; }

    .margin_right_20 { margin-right: 20px; } .margin_right_40 { margin-right: 40px; }

    .fl { float: left; }

    .fr { float: right; }

    templatemo_wrapper {

    width: 980px;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: 170px;
    

    }

    /* header */

    templatemo_header {

    height: 70px;
    padding-top: 0;
    padding-right: 10px;
    padding-bottom: 0;
    padding-left: 10px;
    

    }

    templatemo_header #site_title {

    float: left;
    overflow: hidden;
    width: 200px;
    height: 60px;
    font-size: 40px;
    color: #FFF;
    background-repeat: no-repeat;
    padding-top: 10px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    

    }

    templatemo_header #site_title a {

    color: #000000;
    font-weight: normal;
    text-decoration: none;
    

    }

    templatemo_header #site_title span {

    display: block;
    color: #999;
    margin-top: 5px;
    margin-left: 5px;
    font-size: 12px;
    

    }

    /* menu */

    templatemo_menu {

    float: right;
    margin: 0;
    padding: 0;
    

    }

    templatemo_menu ul {

    margin: 0;
    padding: 30px 0 0 0;
    list-style: none;
    

    }

    templatemo_menu ul li {

    padding: 0px;
    margin: 0px;
    display: inline;
    

    }

    templatemo_menu ul li a {

    float: left;
    width: 100px;
    height: 22px;
    padding: 5px 10px;
    margin-right: 2px;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    color: #FF9201; 
    font-weight: bold;
    outline: none;
    

    }

    templatemo_menu li a:hover, #templatemo_menu li .current {

    color: #000;
    background-repeat: no-repeat;
    

    }

    /* end of menu */

    /* end of header */

    /* banner */

    templatemo_banner {

    clear: both;
    width: 960px;
    height: 190px;
    background: url(images/templatemo_banner.jpg) no-repeat;
    padding-top: 0px;
    padding-right: 10px;
    padding-bottom: 20px;
    padding-left: 10px;
    

    }

    templatemo_banner #about {

    float: left;
    width: 170px;
    color: #CCC;
    padding-top: 15px;
    padding-right: 15px;
    padding-bottom: 8px;
    padding-left: 15px;
    text-align: center;
    font-size: 16px;
    

    }

    templatemo_banner #about a {

    font-weight: normal;
    color: #FFF;
    

    }

    templatemo_banner #banner {

    float: right;
    width: 700px;
    padding-top: 30px;
    

    }

    templatemo_banner #banner h1 {

    color: #fff;
    font-size: 40px;
    line-height: 40px;
    margin-bottom: 10px;
    color: #fff;
    

    }

    templatemo_banner #banner p {

    font-size: 20px;
    color: #CCC;
    

    }

    /* end of banner */

    /* content */

    templatemo_content_wrapper {

    clear: both;
    margin: 0 10px;
    padding: 30px 0;
    background: url(images/templatemo_sidebar.jpg) repeat-y left;
    

    }

    /* sidebar 1 */

    .templatemo_sidebar { float: left; width: 170px; padding: 15px; }

    .sidebar_box { clear: both; margin-bottom: 50px; width: 180px; }

    .sidebar_box h2 { font-size: 18px; font-weight: bold; margin-bottom: 14px; color: #1c1c1c; }

    .sidebar_box .inputfield { height: 16px; width: 160px; padding: 2px 5px; margin: 0 0 10px 0; font-size: 12px; font-variant: normal; line-height: normal; }

    .side_menu { list-style: none; padding: 0px; margin: 0 0 0 0; }

    .side_menu li { padding: 0; margin: 5px 0; }

    .side_menu li a { display: block; color: #ffffff; padding: 2px 10px; font-weight: normal; border-left: 5px solid #493028; } .side_menu li a:hover { text-decoration: none; border-left: 5px solid #c0330a; }

    .news_box { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #333; }

    .news_box h3 a { font-size: 12px; font-weight: normal; text-decoration: underline; }

    /* end of slidebar 1*/

    templatemo_content {

    float: left;
    width: 700px;
    margin-left: 40px;
    

    }

    templatemo_content a {

    font-weight: normal;
    color: #000;
    

    }

    .post_section { margin-bottom: 0px; }

    .post_section h2 { color: #FF9201; font-size: 20px; line-height: 30px; font-weight: bold; padding: 10px 0 10px 0; font-family: Helvetica; }

    .post_section p { margin-bottom: 20px; }

    .post_section img { margin: 20px 0; }

    /* end of content */

    /* footer */

    templatemo_footer_wrapper {

    clear: none;
    width: 200%;
    background-color: #000;
    background-image: url(images/templatemo_footer.jpg);
    background-repeat: repeat-x;
    background-position: top;
    margin-top: 0;
    margin-right: 0px;
    margin-bottom: 0;
    margin-left: 0px;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 380px;
    height: 300px;
    

    }

    templatemo_footer {

    clear: both;
    width: 200%;
    color: #fff;
    margin-top: 0;
    margin-right: 0px;
    margin-bottom: 0;
    margin-left: 0px;
    padding-top: 50px;
    padding-right: 0px;
    padding-bottom: 50px;
    padding-left: 0px;
    height: 200px;
    background-image: url(images/templatemo_footer.jpg);
    background-repeat: repeat-x;
    background-position: top;
    background-color: #000;
    

    }

    templatemo_footer a {

    color: #c1330a;
    

    }

    templatemo_footer h3 {

    font-size: 14px;
    font-weight: bold; 
    color: #fff;
    margin-bottom: 10px;
    

    }

    .footer_menu_list { margin: 0px; padding: 0px; list-style: none; }

    .footer_menu_list li { margin: 0px; padding: 0px; }

    templatemo_footer .footer_menu_list li a {

    color: #dbdbdb;
    

    }

    templatemo_footer .footer_menu_list li a:hover {

    color: #13a0f6;
    text-decoration: none;
    

    }

    .section_w180px { float: left; width: 200px; padding-right: 20px; }

    /* end of footer */

  • sorry about that ... I still don't like this markdown stuff lets try that again

    /* Credit: http://www.templatemo.com */

    .contentmain { font-size: 16px; }

    body { margin: 0; padding: 0; line-height: 1.5em; font-family: Helvetica; font-size: 12px; color: #353535; background: #fff url(images/templatemo_body.jpg) repeat-x top; }

    h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }

    a:link, a:visited { color: #000000; text-decoration: none; font-weight: normal; } a:active, a:hover { color: #000000; text-decoration: underline; }

    p { margin: 0px; padding: 0px; }

    img { margin: 0px; padding: 0px; border: none; }

    .cleaner { clear: both; width: 100%; height: 0px; font-size: 0px; }

    .margin_bottom_10 { clear: both; width: 100%; height: 10px; font-size: 1px; } .margin_bottom_20 { clear: both; width: 100%; height: 20px; font-size: 1px; } .margin_bottom_30 { clear: both; width: 100%; height: 30px; font-size: 1px; } .margin_bottom_40 { clear: both; width: 100%; height: 40px; font-size: 1px; } .margin_bottom_50 { clear: both; width: 100%; height: 50px; font-size: 1px; } .margin_bottom_60 { clear: both; width: 100%; height: 60px; font-size: 1px; }

    .margin_right_20 { margin-right: 20px; } .margin_right_40 { margin-right: 40px; }

    .fl { float: left; }

    .fr { float: right; }

    templatemo_wrapper {

    width: 980px;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: 170px;
    

    }

    /* header */

    templatemo_header {

    height: 70px;
    padding-top: 0;
    padding-right: 10px;
    padding-bottom: 0;
    padding-left: 10px;
    

    }

    templatemo_header #site_title {

    float: left;
    overflow: hidden;
    width: 200px;
    height: 60px;
    font-size: 40px;
    color: #FFF;
    background-repeat: no-repeat;
    padding-top: 10px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    

    }

    templatemo_header #site_title a {

    color: #000000;
    font-weight: normal;
    text-decoration: none;
    

    }

    templatemo_header #site_title span {

    display: block;
    color: #999;
    margin-top: 5px;
    margin-left: 5px;
    font-size: 12px;
    

    }

    /* menu */

    templatemo_menu {

    float: right;
    margin: 0;
    padding: 0;
    

    }

    templatemo_menu ul {

    margin: 0;
    padding: 30px 0 0 0;
    list-style: none;
    

    }

    templatemo_menu ul li {

    padding: 0px;
    margin: 0px;
    display: inline;
    

    }

    templatemo_menu ul li a {

    float: left;
    width: 100px;
    height: 22px;
    padding: 5px 10px;
    margin-right: 2px;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    color: #FF9201; 
    font-weight: bold;
    outline: none;
    

    }

    templatemo_menu li a:hover, #templatemo_menu li .current {

    color: #000;
    background-repeat: no-repeat;
    

    }

    /* end of menu */

    /* end of header */

    /* banner */

    templatemo_banner {

    clear: both;
    width: 960px;
    height: 190px;
    background: url(images/templatemo_banner.jpg) no-repeat;
    padding-top: 0px;
    padding-right: 10px;
    padding-bottom: 20px;
    padding-left: 10px;
    

    }

    templatemo_banner #about {

    float: left;
    width: 170px;
    color: #CCC;
    padding-top: 15px;
    padding-right: 15px;
    padding-bottom: 8px;
    padding-left: 15px;
    text-align: center;
    font-size: 16px;
    

    }

    templatemo_banner #about a {

    font-weight: normal;
    color: #FFF;
    

    }

    templatemo_banner #banner {

    float: right;
    width: 700px;
    padding-top: 30px;
    

    }

    templatemo_banner #banner h1 {

    color: #fff;
    font-size: 40px;
    line-height: 40px;
    margin-bottom: 10px;
    color: #fff;
    

    }

    templatemo_banner #banner p {

    font-size: 20px;
    color: #CCC;
    

    }

    /* end of banner */

    /* content */

    templatemo_content_wrapper {

    clear: both;
    margin: 0 10px;
    padding: 30px 0;
    background: url(images/templatemo_sidebar.jpg) repeat-y left;
    

    }

    /* sidebar 1 */

    .templatemo_sidebar { float: left; width: 170px; padding: 15px; }

    .sidebar_box { clear: both; margin-bottom: 50px; width: 180px; }

    .sidebar_box h2 { font-size: 18px; font-weight: bold; margin-bottom: 14px; color: #1c1c1c; }

    .sidebar_box .inputfield { height: 16px; width: 160px; padding: 2px 5px; margin: 0 0 10px 0; font-size: 12px; font-variant: normal; line-height: normal; }

    .side_menu { list-style: none; padding: 0px; margin: 0 0 0 0; }

    .side_menu li { padding: 0; margin: 5px 0; }

    .side_menu li a { display: block; color: #ffffff; padding: 2px 10px; font-weight: normal; border-left: 5px solid #493028; } .side_menu li a:hover { text-decoration: none; border-left: 5px solid #c0330a; }

    .news_box { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #333; }

    .news_box h3 a { font-size: 12px; font-weight: normal; text-decoration: underline; }

    /* end of slidebar 1*/

    templatemo_content {

    float: left;
    width: 700px;
    margin-left: 40px;
    

    }

    templatemo_content a {

    font-weight: normal;
    color: #000;
    

    }

    .post_section { margin-bottom: 0px; }

    .post_section h2 { color: #FF9201; font-size: 20px; line-height: 30px; font-weight: bold; padding: 10px 0 10px 0; font-family: Helvetica; }

    .post_section p { margin-bottom: 20px; }

    .post_section img { margin: 20px 0; }

    /* end of content */

    /* footer */

    templatemo_footer_wrapper {

    clear: none;
    width: 200%;
    background-color: #000;
    background-image: url(images/templatemo_footer.jpg);
    background-repeat: repeat-x;
    background-position: top;
    margin-top: 0;
    margin-right: 0px;
    margin-bottom: 0;
    margin-left: 0px;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 380px;
    height: 300px;
    

    }

    templatemo_footer {

    clear: both;
    width: 200%;
    color: #fff;
    margin-top: 0;
    margin-right: 0px;
    margin-bottom: 0;
    margin-left: 0px;
    padding-top: 50px;
    padding-right: 0px;
    padding-bottom: 50px;
    padding-left: 0px;
    height: 200px;
    background-image: url(images/templatemo_footer.jpg);
    background-repeat: repeat-x;
    background-position: top;
    background-color: #000;
    

    }

    templatemo_footer a {

    color: #c1330a;
    

    }

    templatemo_footer h3 {

    font-size: 14px;
    font-weight: bold; 
    color: #fff;
    margin-bottom: 10px;
    

    }

    .footer_menu_list { margin: 0px; padding: 0px; list-style: none; }

    .footer_menu_list li { margin: 0px; padding: 0px; }

    templatemo_footer .footer_menu_list li a {

    color: #dbdbdb;
    

    }

    templatemo_footer .footer_menu_list li a:hover {

    color: #13a0f6;
    text-decoration: none;
    

    }

    .section_w180px { float: left; width: 200px; padding-right: 20px; }

    /* end of footer */

  • you know what I give up here I'll put it on CodePen for ya ... http://codepen.io/JosiahBranner/pen/AHjsc