SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: How to display image with no src link on Firefox

  1. #1
    SitePoint Zealot ketting00's Avatar
    Join Date
    Jul 2011
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to display image with no src link on Firefox

    Hi,

    I have simple snippets of code like below:
    Code:
    <img src='' id='video' />
    and the CSS:
    Code:
    #video {
    	width: 640px;
    	height: 320px;
    	background: #222;
    }
    They display fine on Chrome and Opera but the DIV doesn't show up on Firefox.
    How do I have it appeared?

    Thanks,

  2. #2
    It's all Geek to me silver trophybronze trophy
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    19,968
    Mentioned
    216 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by ketting00 View Post
    Hthe DIV doesn't show up on Firefox.
    What div?

    Anyhow, there's no point in having an image element with no source url. What's your aim here?

  3. #3
    SitePoint Zealot ketting00's Avatar
    Join Date
    Jul 2011
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    What div?

    Anyhow, there's no point in having an image element with no source url. What's your aim here?
    Thanks or reply,

    Sorry, it's the video element. They display on Opera, Chrome and Safari.

    There is no source url because I will insert it dynamically via javascript.

  4. #4
    SitePoint Zealot ketting00's Avatar
    Join Date
    Jul 2011
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Done:
    just put {display: block;} in

  5. #5
    It's all Geek to me silver trophybronze trophy
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    19,968
    Mentioned
    216 Post(s)
    Tagged
    2 Thread(s)
    Perhaps post your HTML for that CSS too, as it's not clear what's happening right now. The element with the id #video should show up.

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
  •