Results 1 to 4 of 4

Thread: Image wont display. and whole page dissappears, if I change any code slightly,

  1. #1
    Join Date
    Apr 2012

    Image wont display. and whole page dissappears, if I change any code slightly,

    Is this right, cause I cant get an image on.
    #headline1 {background-image.url('images/models/model2.jpg');
    padding-top 68px;
    <div id="headline1"><img src="pictures/images/models/model2.jpg" alt="/></div>

    tried putting(../images/models/model2.jpg') but then the whole webpage dissappeared again. And I cant get it back.
    Yesterday, I had a nice design up, but it dissappeared, and I cant get it back either. Is it coffee cup. Does it have a bug, do you think, or could it be my browser.

  2. #2
    Join Date
    Mar 2006
    Northern UK :((
    What is the file path for the file in question?

    Sounds rather over complicated. I just ditch all my images in the same folder.

  3. #3
    Join Date
    Sep 2006
    new york

    need : colon

    You seem to have a period after background-image: url(image.jpg);

    See for instance http://www.w3schools.com/cssref/pr_background-image.asp) or
    Last edited by auntnini; 05-26-2012 at 04:06 PM. Reason: correction re "quotes"

  4. #4
    Join Date
    Feb 2008
    NW Washington State
    Review the correct syntax for background image as suggested. It will look like this example:
    background: url('../images/pano5_gradient_bar1.jpg') top center no-repeat;
    Also realize that if the background image is being called from an external style sheet, the path to the image is relative to (starting at) the .css file, not the Web page it's being used on.
    If the css is directly on the Web page... then you can use a path relative to the Web page.
    So in the example I posted above, the "style_sheets" folder is at the same level as my images folder.... so to use that background image (starting at the css file), I have to go up one folder level (the ../ part of the path), then into the images folder.
    In your example:
    #headline1 {background-image.url('images/models/model2.jpg');
    You are saying that the images folder is one level below the .css file (which may or may not be correct.
    And yes, you do need to use the colon: not the single period... as mentioned.
    Best wishes,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles