Image starts to show up once text is there.

Discussion in 'CSS' started by wvccboy, Mar 5, 2008.

  1. #1
    In my stylesheet, I tried to do this:


    background:url(images/logo.png) no-repeat;

    However, it only shows up in my html document

    <div id="logo">

    </div>

    when I put some text inside that div.

    I want the image to display, and no text being entered inside there.

    It looks right to me, but it seems there's something I've done that makes it work when i put text inside there.

    Any clues?

    Thanks!
     
    wvccboy, Mar 5, 2008 IP
  2. donross

    donross Active Member

    Messages:
    90
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    98
    #2
    lolz... define a height and width for your #logo {}
     
    donross, Mar 5, 2008 IP
    wvccboy likes this.
  3. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #3
    How did I miss that?? Wow...

    Well, thanks a lot donross. I'd probably be sitting here 10 more hours without your help :D
     
    wvccboy, Mar 5, 2008 IP
  4. donross

    donross Active Member

    Messages:
    90
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    98
    #4
    i already encountered that a few times.. makes me dumb and spending too much time without realizing the problem was so simple... well, as for me i never ask someone when i had problems... i solve it myself if google cant answer it... and because of that i can fix any css problems now without any sweat... experience makes you a good coder... cheers and good thing there's digitalpoint for you.. ;)
     
    donross, Mar 5, 2008 IP