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 5 of 5
  1. #1
    Junior Member MichaelRoe's Avatar
    Join Date
    May 2012
    Location
    Brisbane, Australia :D
    Posts
    12
    Member #
    31866
    Liked
    1 times
    Ok, so I need some CSS code to make the header div in my website have a background of a local file image (it will later be an online image, but for now I'm testing it with local files).

    I have the header image already prepared, with a height of 36px and width of 1px. I want the image to stretch on the x-axis across the whole width of the header div.

    Anyone got any code for that?

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times

  4. #3
    Junior Member MichaelRoe's Avatar
    Join Date
    May 2012
    Location
    Brisbane, Australia :D
    Posts
    12
    Member #
    31866
    Liked
    1 times
    Yeah that would work, but for some reason I can't get a LOCAL FILE IMAGE to work... :/

  5. #4
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Several questions:
    are you using a virtual sever (WAMP, MAMP, XAMPP) on your local machine?
    what browser(s) are you testing in?
    what are you writing your code with?
    are your paths to the CSS and image files correct?
    and finally - silly I know but it sometimes catches people - are your file extensions in lowercase?
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  6. #5
    Member christopher_b's Avatar
    Join Date
    Aug 2011
    Location
    Pretoria, South Africa
    Posts
    69
    Member #
    29042
    Liked
    7 times
    if the image is in the same directory as your html file.. then something like this should work
    background: #color url(image.jpg) repeat-x left top;

    If the image is in a sub directory or somewhere else then this is how..
    background: #color url(path/to/image.jpg) repeat-x left top;


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 12:41 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com