Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’re setting the background colour to white within the section allocated in the dashboard, or through Custom CSS?

    Thread Starter davidjeanneret

    (@davidjeanneret)

    Not through CSS

    Either through customise from the admin bar
    Or through customise when looking at the theme selection
    Or through appearance > background

    Thread Starter davidjeanneret

    (@davidjeanneret)

    How did this get marked as resolved – it’s not

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Have you tried this CSS;

    body {
     background: white;
    }

    ?

    ‘it is not a bug – it is a feature’

    it really is intended – the moment you set the background color to white #fff or #ffffff, under dashboard – appearance – backgrounds – the padding, and shadow-box and a few other formattings are changed on purpose.

    this is programmed in functions.php where a special body_class is added, which then in turn is used in style.css to change the formatting.

    from functions.php:

    if ( empty( $background_color ) )
    		$classes[] = 'custom-background-empty';
    	elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )
    		$classes[] = 'custom-background-white';

    if you intend to change that, start by creating a child theme; https://codex.www.ads-software.com/Child_Themes

    related:
    https://www.ads-software.com/support/topic/error-with-changing-background-to-white-on-twenty-twelve?replies=4

    Thread Starter davidjeanneret

    (@davidjeanneret)

    You wp guru! Thanks. And now I can think that it might make sense, most people probably wouldn’t notice it, but I’d put a border on the content div (I think). So in my child theme, I just put that same function in but have the outcome the same for the ifs (can’t work out which way I’d want it in my head. Will look later) it’ll sort it out!

    Thanks

    David

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Twenty Twelve bug when changing background colour?’ is closed to new replies.