Results 1 to 6 of 6

Thread: background image from another CSS file?

  1. #1
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default background image from another CSS file?

    I want to link all the pages I want to have a certain background image linked to a single css file. How do I do that? Thanks for any help, JF
    -JF

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Code:
    <link href="path/to/stylesheet" media="screen" rel="Stylesheet" type="text/css" />
    Next add this to the css file: (if you're adding the background to a page, not a div):

    Code:
    body { background-image:url(relative/path/to/image/from/css/file); }
    It's as simple as that
    HTH
    Last edited by Medyman; 01-30-2008 at 06:06 PM. Reason: misplaced ;

  3. #3
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there anything that can make this not work? All my references are correct, the address's are correct, everything is spelled correctly, but it doesn't work. Any thoughts? I'll keep testing different things. Thanks for any help, JF
    -JF

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Code?
    Jeremy | jfein.net

  5. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by Freeman View Post
    Is there anything that can make this not work? All my references are correct, the address's are correct, everything is spelled correctly, but it doesn't work. Any thoughts? I'll keep testing different things. Thanks for any help, JF
    It's hard to know without seeing your code. Please post relevant code and I'm sure we can get to the bottom of it.

  6. #6
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So, it does work, I just need to figure out what is wrong with my code. Thanks, Jf



    The reason it did not work is because I had the <style type="text/css"> in my css file. It didn't like that very much. thanks for the help, JF
    -JF

Bookmarks

Posting Permissions

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