开发者

how to edit a wordpress theme background?

开发者 https://www.devze.com 2023-03-09 23:08 出处:网络
I have wordpress installed on my system. I am using twentyten theme, in the theme directory there is style.css file. In that file I tried

I have wordpress installed on my system. I am using twentyten theme, in the theme directory there is style.css file. In that file I tried

body {
       background-color: red;
}

but nothing happens, no matter what change in style.css it does not reflects in browser. Pl开发者_运维百科ease help.


Have you cleared your browser's cache? Often the browser will cache the css files to be more efficient, so any changes you make to it require you to clear the cache.

If you're using a windows machine: ctrl + shift + del should bring up the clear cache dialog

Edit: it appears that your css was in the @media print section of the stylesheet - which only applies to printed material


The best way to figure this stuff out is to install Firebug in Firefox or use the built-in Inspector in Chrome.

Right-click on the page, do 'Inspect Element' and check what the Inspector tells you. Probably the background-color you're setting is being overruled by another style rule (Inspector will tell you this) or there are other elements with another background-color which are placed on top of the body, thus hiding the red background-color.

Either way, doing an 'Inspect Element' will make this clear. We can only guess from here.


First of all ensure that you're editing the right style sheet. For example try to erase all the styling code inside this file and refresh your website. If you loose your style then you're in the right place.

Second try to use Firebug Addon it will help you to inspect the html Element then you can show the corresponding CSS for this element. you can change whatever you want and see the effects directly on your page then you can write these changes to the style sheet. hope it helps you.


Maybe that style is overwritten by another background attribute on the body a few lines below (browser will always render the last css attributes of elements). Something you can check easily with firebug.

If you have plugins, disable them just to be sure.

Other then that and the suggestions already made I'm not entirely sure what could cause this

0

精彩评论

暂无评论...
验证码 换一张
取 消