default background color issue
-
I add this code to my fuction.php child theme for custom background color but when i change the color and save, after refresh it turned back to defult color . why? notice: i use wordpress 3.5.1
add_theme_support( 'custom-background', array( // Let WordPress know what our default background color is. 'default-color' => '#0000ff', ) );
-
i send all of the css codes
/* CSS Document */ html, body, table, th, tr, td, p, img, hr, ul, li, h1, h2, h3, h4, h5, div, form, fieldset {padding:0; margin:0; border:none; } /* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em, img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption, tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section, summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details, figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none} blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none} table{border-collapse:collapse;border-spacing:0} body {background-color:#0000ff; font: Arial, Helvetica, sans-serif; size:20px; color:#ffffff; line-height: 1.5; } A:link{text-decoration: none; color:#0bbcf6;} A:visited {text-decoration: none; color:#00e741;} A:active {text-decoration: none; color:#00e741;} A:hover {text-decoration: underline; color: red;} #main { background:#000000; width:1000px; height:1200px; margin:auto; border:solid 1px #0000FF; } #header { width:1000px; height:30px; border-bottom:solid 1px #0000FF; margin:auto; } #container { width:780px; height:750px; margin-top:100px; float:right; border-top:solid 1px #0000FF; border-left:solid 1px #0000FF; border-bottom:solid 1px #0000FF; font-family:hobo std; letter-spacing:1px; padding:10px 0 0 10px; } #sidebar { border-right:solid 1px #0000FF; border-top:solid 1px #0000FF; border-bottom:solid 1px #0000FF; margin-top:100px; width:180px; height:750px; float:left; color:#ffffff; } #footer { width:1000px; height:200px; border-top:solid 1px #0000FF; margin-top:970px; background-color:#222226; } nav { margin:0px 50px ; } nav ul li { display:inline-block; *display: inline; zoom: 1; font-family:hobo std; margin:7px 5px 5px 5px; } nav ul li a { padding:20px 30px; color:#0000ff; text-decoration:none; } .widget { border-bottom:solid 1px #0000FF; clear:both; padding:10px 8px 10px 10px; font-family:hobo std; color:#87d6f7; letter-spacing:0.5px; } ul li {list-style-type:none;} #commentdiv { margin-top:200px;}Your black background is not coming from the
<body>tag, it’s coming from<div id="main">.In Google chrome, view your webpage and right click on the black background just below the navigation.
Select ‘Inspect element’.
In the new toolbar, look on the right hand side.
[screenshot]i watn to change the background color of body. the blue color
Did you try removing the black background colour on
<div id="main">?why i must remove it ?
Why not?
i remove it and after refresh it turn back to blue
Is that what you want?
no . i wat to chand the background of the body.not the main <div>
i want to change it from the wordpress , not from the cssYou did change the
<body>to blue.
The reason why your page was black was because of the CSS applied to<div id="main">.i said i want to id=”main” color to be black. i want to change the color of the body tag . the blue color . from the wordpress dashbord , not from css
please read my first post again
What turned back to the default colour, the webpage?
yes , the background color . the blue color
The topic ‘default background color issue’ is closed to new replies.