• Hi
    I cant find in 2012 css where to change the content background colour on certain pages, when i change .site – a big box appears around the page. The header, menu and footer should remain the background colour and the content should be white, but when i change .site-content i get weird boxes with no padding – so what i would like to know is what the area below menu and above footer is called, plus is there a away to get rid of the white line above the footer and a faint double line at bottom of content area below edit

    site link
    https://bunddesign.com/pdm/lets-talk/

    I would also love to know what below means as i cant find #primary in the css file, and what does role mean

    <div id="primary" class="site-content">
    		<div id="content" role="main">

    Thank you in advance
    Melanie

Viewing 6 replies - 1 through 6 (of 6 total)
  • Here’s info about role:

    https://stackoverflow.com/questions/10403138/what-is-the-purpose-of-the-role-attribute-in-html

    To remove the white line on your footer, look for this block in your CSS:

    footer[role="contentinfo"] {
    border-top: 1px solid #ededed;
    clear: both;
    font-size: 12px;
    font-size: 0.857142857rem;
    line-height: 2;
    max-width: 960px;
    max-width: 68.571428571rem;
    margin-top: 24px;
    margin-top: 1.714285714rem;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 0;
    padding: 1.714285714rem 0;
    }

    and get rid of border-top: 1px solid #ededed;

    The white content area on the left is #primary and the one on the right is #sidebar

    To change the color of #primary, look for and update the background property value to your new color:

    .site-content {
    margin: 24px 0 0;
    margin: 1.714285714rem 0 0;
    background: #FFF;

    Oh, finally, to remove the double line, look for:

    .site-content article {
    border-bottom: 4px double #ededed;
    margin-bottom: 72px;
    margin-bottom: 5.142857143rem;
    padding-bottom: 24px;
    padding-bottom: 1.714285714rem;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
    }

    And delete the border-bottom property.

    Farez Murshidi

    (@silverpandastudios)

    Hi Melanie,
    My name is Reece. I checked out your site to answer your first question. The area between the header and footer is identified as id=”main” and in your HTML looks like this:

    <div id="main" class="wrapper">
         <div id="primary" class="site-content">
              <div id="content" class="site-content">
                   <div id="content" role="main"></div>
              </div>
         <div id="sidebar" class="widget"></div>
    </div>

    To answer your second question the primary id is a designation used by WP for your posts. The role attribute is from ARIA 1.0 and many of the roles were later incorporated into HTML5 as elements. e.g. <main>…</main>. Adding the role=”main” is technically redundant but it helps support browsers that currently support Aria1.0 but not yet HTML5.
    For more information on the role attribute this site gives a very good explanation.
    https://stackoverflow.com/questions/10403138/what-is-the-purpose-of-the-role-attribute-in-html

    Thread Starter melanie bund

    (@melanie-bund)

    Thank you so much for your help
    The footer advice worked great, though there seems to be a ghost outline around the page which i cant seem to get rid of. Any ideas?
    Removing the
    .site-content article
    border-bottom: 4px double #ededed;
    has no effect for some reason.
    AND
    my last and important quandary is
    to make the content background white i added to the css
    #main .wrapper {background:white}
    but nothing

    HELP
    Melanie

    Are you sure you removed this from .site-content article?

    border-bottom: 4px double #ededed;

    I still see it on there.

    That’s strange, but the code below should work:

    #main .wrapper {
    background: #fff;
    }
    Thread Starter melanie bund

    (@melanie-bund)

    Hi Jan and Reece
    Yes i have removed the
    ‘border-bottom: 4px double #ededed;’
    from
    ‘.site-content article’
    in my child .css – is there anywhere else in the style sheet that overrides it?
    The code below only seems to do work on full page template
    https://bunddesign.com/pdm/photography/
    ‘#main .wrapper {
    background: #fff;
    }’
    on default page template as below – nothing
    https://bunddesign.com/pdm/lets-talk/
    HELP!?
    Melanie

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘TWENTY TWELVE Content background colour’ is closed to new replies.