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 5 of 5

Thread: Need Help Bad

  1. #1
    New Coder DjDanHayden's Avatar
    Join Date
    Nov 2008
    Location
    Ireland
    Posts
    55
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Need Help Bad

    Hi everyone,

    I have been trying this for about 2 hours now i bet its an easy fix i just cant see.

    Code:
    #new_to_ig 
    
    { 
    
    position:absolute; 
    top:197px; 
    right:390px;
    width:355px; 
    height:235px; 
    background:transparent url(/theme/images/new_to_ig.jpg) no-repeat ; 
    
    }


    The image new_to_ig.jpg will just not show up no matter what i try... this is what i have in the php end...


    Code:
    <div id="new_to_ig">
    <h2><a href="" title="Popular Gaming Arenas">New To IG ?</a></h2>
    
    
    </div>


    However this will will work but its no good as i need the image running off the css..



    Code:
    <div id="new_to_ig">
    <h2><a href="" title="Popular Gaming Arenas">New To IG ?</a></h2>
    <img src="./theme/images/new_to_ig.jpg" width="355" height="235" alt="Hi">
    </div>


    Any idea on how to get the image to show from the css.... ?

    Thanks in advance !

    The image will not show

  • #2
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    ./path/to/image.jpg

    is not the same as

    /path/to/image.jpg

    what is the file structure like ? where is your CSS file in relation to the document and indeed the images you are referring to

  • Users who have thanked met for this post:

    DjDanHayden (08-05-2010)

  • #3
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Well, it sounds like the path to your image is wrong. Depends how you have your folders structured, but if you've got your css file in the same file as your html page, and the image on the page works, then your css should be:

    Code:
    #new_to_ig 
    
    { 
    
    position:absolute; 
    top:197px; 
    right:390px;
    width:355px; 
    height:235px; 
    background:transparent url(./theme/images/new_to_ig.jpg) no-repeat ; 
    
    }
    which then matches the path when you have the image on the page.

    If this isn't the problem, then a link to your page would help.

  • Users who have thanked SB65 for this post:

    DjDanHayden (08-05-2010)

  • #4
    New Coder DjDanHayden's Avatar
    Join Date
    Nov 2008
    Location
    Ireland
    Posts
    55
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Fixed, My URL to the site have /home/ after it so i needed to add that...


    WOW is all i can say... lol

    and thanks to you guys...

  • #5
    Regular Coder
    Join Date
    Jul 2010
    Location
    St George, UT
    Posts
    138
    Thanks
    6
    Thanked 17 Times in 17 Posts
    Haha... spending hours on problems like this has the unfortunate result of driving yourself crazy but the fortunate result of being much less likely to make the same mistake.


  •  

    Posting Permissions

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