Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Joomla site, background image in CSS

    I have a new joomla 2.5 site : www.joomla25.meadowsmedical.com

    I need to put an image (tiled) as the html background for all pages. My template people directed me to the proper css file template.css and this is what I put in:

    html {
    background-image:url('http://www.joomla25.meadowsmedical.com/speckled2.jpg');
    }
    Nothing happened. I then tried it with "body" instead of "html" and the image didn't show in the body either.

    The url is accurate. The new changed css file was properly transferred to the correct directory.

    Any idea what I am doing wrong here?...thanks

    I am very new to this

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by Snostar View Post
    I have a new joomla 2.5 site : www.joomla25.meadowsmedical.com

    I need to put an image (tiled) as the html background for all pages. My template people directed me to the proper css file template.css and this is what I put in:

    html {
    background-image:url('http://www.joomla25.meadowsmedical.com/speckled2.jpg');
    }
    Nothing happened. I then tried it with "body" instead of "html" and the image didn't show in the body either.

    The url is accurate. The new changed css file was properly transferred to the correct directory.

    Any idea what I am doing wrong here?...thanks

    I am very new to this
    Welcome to the forum.

    Your problem is here:
    Code:
    body.contentpane {
    	background: #ffffff;
    	padding: 25px;
    	font-size: 12px;
        
     #html {
        background-image:url('http://www.joomla25.meadowsmedical.com/speckled2.jpg');
        } 
    }
    You have inadvertently added the html style inside of the body style section which means it is ignored by the browser as bad CSS. In addition, you have used the hash symbol (#) in front of "html" which means the style will only apply to an element with an ID of "html" which is not the same as actually selecting the html element itself. Change it to this and see if your problems are solved:

    Code:
    body{
    	background: #ffffff;
    	background-image:url('http://www.joomla25.meadowsmedical.com/speckled2.jpg');
    	padding: 25px;
    	font-size: 12px;
    }
    Last edited by Rowsdower!; 07-31-2013 at 03:29 PM.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •