Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CSS Frustration!

Options
  • 21-09-2010 8:11pm
    #1
    Registered Users Posts: 1,776 ✭✭✭


    Hi Guys,

    Just beginning with CSS so go easy on me :)

    I'm trying to edit the CSS of a Wordpress theme to change the background colour. There are a number of options in the theme control panel for different colour schemes, but I'm looking to add an image in the background.

    I've played around with the styles.css file for awhile, changing anything that looks remotely like it may be related to the background but not with much luck. It seems I've discovered how to change the colour of everything but this :)

    I thought it would pretty much be in the following section:

    html { height: 100% }
    body { background: #fff; color: #000; font-size: 100.01%; min-height: 101%; text-align: left }
    img, fieldset, abbr, acronym { border: 0 }

    I've tried changing both the background, and the color fields to #234 just to see if this changed it, but nothing changed.

    Would there be somewhere that the background colour is overwritten, or am I missing something very obvious?

    Thanks in advance for the help,
    Sean


Comments

  • Registered Users Posts: 339 ✭✭duffman85


    This sets the background colour to white(#FFFFFF)
    [PHP]
    background-color:#fff;
    [/PHP]

    This changes the text to red:

    [PHP]
    color:#ff0000;
    [/PHP]
    To use an image as a background:
    [PHP]
    body
    {
    background-image:url(background.jpg);
    background-repeat:repeat-x;
    }
    [/PHP]
    repeat-x can be replaced by repeat-y or no-repeat

    If the theme uses other divs on top of the background it may block out your background. You can comment these out temporarily with <!-- stuff to comment out -->


  • Registered Users Posts: 912 ✭✭✭chakotha




  • Registered Users Posts: 1,801 ✭✭✭cormee


    duffman85 wrote: »
    This sets the background colour to white(#FFFFFF)
    [PHP]
    background-color:#fff;
    [/PHP]

    This changes the text to red:

    [PHP]
    color:#ff0000;
    [/PHP]
    To use an image as a background:
    [PHP]
    body
    {
    background-image:url(background.jpg);
    background-repeat:repeat-x;
    }
    [/PHP]
    repeat-x can be replaced by repeat-y or no-repeat

    If the theme uses other divs on top of the background it may block out your background. You can comment these out temporarily with <!-- stuff to comment out -->

    'background' is shorthand for 'background-color' so it's equally valid and should work.

    OP, are you sure there isn't another element such as a div which has a background colour overlying the body background? Get yourself Firebug for Firefox, if you don't have it already, and have a look at the CSS on the live site.


  • Registered Users Posts: 1,776 ✭✭✭Bawnmore


    duffman85 wrote: »
    This sets the background colour to white(#FFFFFF)
    [PHP]
    background-color:#fff;
    [/PHP]

    This changes the text to red:

    [PHP]
    color:#ff0000;
    [/PHP]
    To use an image as a background:
    [PHP]
    body
    {
    background-image:url(background.jpg);
    background-repeat:repeat-x;
    }
    [/PHP]
    repeat-x can be replaced by repeat-y or no-repeat

    If the theme uses other divs on top of the background it may block out your background. You can comment these out temporarily with <!-- stuff to comment out -->

    Thanks for that, the background image code particularly. I've added "backround-color" to the "body" section, but nothing changing.

    So would I be right to assume that other divs might be used?

    My whole body section is as follows:
    body {
    	font-family: "Lucida sans", Arial, Helvetica, sans-serif;
    	font-size: 75%;
    	line-height: 1.5em;
    	text-align: center;
    	padding: 0 0 30px;
    	color:#666666;
                 background-color: #FFFFFF;
    }
    

    Thanks for that, I'll have a read through it this evening!


  • Registered Users Posts: 1,776 ✭✭✭Bawnmore


    cormee wrote: »
    'background' is shorthand for 'background-color' so it's equally valid and should work.

    OP, are you sure there isn't another element such as a div which has a background colour overlying the body background? Get yourself Firebug for Firefox, if you don't have it already, and have a look at the CSS on the live site.

    Have just installed Firebug, and had a check there, and it seems that's exactly the problem :) Seems very confusing though, but everything does at the beginning I suppose!

    Cheers guys, appreciate the help. I'll probably be back with more questions in the next week or so!

    Sean


  • Advertisement
Advertisement