I have installed a complete blank theme with no CSS in my new wordpress blog. I have been trying to give it a background image but no success.
I am working on blog’s content. Blog is very new. So, until content is ready, I want just a background image to appear on my blog and have some text in the middle of the page.
I removed content from footer.php, I removed default post which you see when WordPress is first involved. I removed content in searchform. php too. I want it all blank for sometime. just want a BG image and some text that displays in the middle of my blog.
I added this line in blank theme’s style.css..its not working. ALso where do I add text so it displays in the centre?
body { background: url('http://mysite.com/wp-content/uploads/2012/03/myIMG.jpg')
Can some one please help me out here??
I do not know anything about PHP so I dont knwo where to add text. Please help me. Which php whould I add text to? and also this background image isnt still working. I changed “background” to “background-image” now
this is the only css file in my WordPress blog as of now..I have been making changes in this only.
/*
Theme Name: BlankSlate
Theme URI: http://tidythemes.com/blankslate/
Description: BEFORE USING AND ESPECIALLY UPGRADING PLEASE READ: tidythemes.com/concept. The bare essentials of a WordPress theme, no visual CSS styles added. Perfect for those who would like to build their own theme from scratch or for clients if you're a developer or designer. This theme is clean, valid code, semi minified, no programmer comments, SEO-friendly and 100% open source. One custom menu and one widgetized sidebar to get you started. If you don't know CSS and would like to learn we've prepared: tidythemes.com/want-to-learn-css and please visit us in the forum for further help: tidythemes.com/forum - Thank You and Enjoy
Author: TidyThemes
Author URI: http://tidythemes.com/
Version: 2.0
Tags: custom-menu, featured-images, microformats, sticky-post, threaded-comments
License: GNU General Public License v2.0 | From TidyThemes: This theme is completely free and open source to use as you like for both personal and commercial projects without any limitations.
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
body { background-image: url('http://mysite.com/wp-content/uploads/2012/03/myIMG.jpg') !important; no-repeat}
body { text-align: center !important;}
html{ margin-top:0px !important;}
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{font-size:100%;font:inherit;padding:0;border:0;margin:0;vertical-align:baseline}
body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
.sticky{}
.bypostauthor{}
.wp-caption{}
.wp-caption-text{}
.gallery-caption{}
.alignright{}
.alignleft{}
.aligncenter{}
As a quick fixing just apply important it should work. It will override existing background.
But make sure your path is correct.
if you have the element, find the class name or its id name. If you can’t find it then overwrite it, just put this code in your css
If that doesn’t work make sure that the css file that you use to insert the code is in the last order where you declared your other css file.