Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Setting a website background

I would like to set the background of my entire site to be a certain image. How would I go about doing this (I have HTML and CSS exp. but little in PHP)

Best Answer


  • Options

    Thanks, ignorantly ignored the .tpl thinking it was going to be in some alien language!

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Don't put style information in your markup!

    Open your theme's custom.css file (located in /themes/ThemeName/design/custom.css) and add the background rule to the body selector.

    Why should you separate style from markup?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    jackmaessenjackmaessen ✭✭✭
    edited March 2015

    Actually, this is a little bit strange. If someone gives an answer on a question, and it is the only answer so far, when accepting the answer by topicstarter, it becomes the best answer. To become the best answer, you should have at least more answers to compare with to become the best one... ;) In my opinion, in stead of "Best Answer" there should be displayed "Accepted Answer'

  • Options

    I agree with @hgtonight . That is a more proper way to do it.

  • Options

    I think the fact that it allowed me to do what I wanted to do means that it didn't require any more attention and therefore I marked it as Answered. I'll decide whether someone has answered my questions, thank you.

  • Options

    @TheSkiMC that is all very well, but sometimes the first solution isn't the best one.

    In html5 this attribute is not longer supported. It is a remnant from html3.

    css gives you more control over the background, and has greater compatibility.

    grep is your friend.

Sign In or Register to comment.