Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By mkymn8828

Thread: Create Background image in Div

  1. #1
    Junior Member
    Join Date
    Jan 2015
    Posts
    24
    Member #
    41395
    Liked
    2 times

    Create Background image in Div

    Want to put a background image on my header div,

    #header {
    background-image: url (images/headerpix.png)
    }

    Not sure if the image itself has to be in another div an then stack them on top of each other using the index property?

    I also put it in the HTML as well:

    <name>Mike Perham</name>
    <h3><i>Artistic, Builder, Creative, Designer</i></h3>
    <img alt="headerpix" src="http://www.webdesignforums.net/forum/images/headerpix.png" width="960" height="119" />

    <hr/>

    </div><!-- END .HEADER -->

    http://mast.salemstate.edu/itc18244/Portfolio/

    If I do so then the image sits below the text. Any ideas?
    Last edited by mkymn8828; Feb 05th, 2015 at 12:44 PM.

  2.  

  3. #2
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    Try:

    Background: url(/images/headerpix.png);

    Dont forget the ; at the end of your rule


    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks

  4. #3
    Junior Member
    Join Date
    Jan 2015
    Posts
    24
    Member #
    41395
    Liked
    2 times
    got it! thank you so much
    Vapr_Arts likes this.

  5. #4
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    I guess i should have mentioned if you have css in a folder and images in a separate folder you will need the / before anything else like i have in my example.


    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:47 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com