Float image in the background

  • Author
    Posts
  • #1365413

    brief22
    Member

    Hi,

    I am trying to float an image in my background. The theme is “Confit.” I want it to float just above my latest post. Is there a way to do this?

    Thanks for your help!

    The blog I need help with is sambrief.com.

    #1365677

    mrdirby
    Member

    you can have two background images present at the same time.

    body {
    background-image: url('your current background url'), url('new image url');
    }

    You can position the new image the same as you would another image by adding a comma and then the code. For example:

    body {
    background-image: url('your current background url'), url('new image url');
    background-repeat: no-repeat, repeat;
    }
    #1365678

    brief22
    Member

    That didn’t work for me. I copied and pasted the second CSS you sent, using image URLs from Dropbox, but nothing changed.

    #1365712

    Another option would be to attach the image to a different element, like the main content area. Here is an example:

    #main {
    	background: url('http://s.wordpress.org/about/images/logos/wordpress-logo-32-blue.png') 335px 20px no-repeat;
    	height: 120px;
    }

    Change the url() value to an image of your choice, then adjust the 335px and 20px numbers to move the background image around.

The topic ‘Float image in the background’ is closed to new replies.