/    Sign up×
Community /Pin to ProfileBookmark

image not displaying

I am trying to display an image by using css. The code isn’t working. Nothing is displayed.

I have tried this code;

[CODE]#head-photo {background-image: url(‘http://what-do-christians-believe.co.uk/wpimages/people-2d.jpg’);
max-width: 30em;
max-height: 15em;}[/CODE]

I currently have this code in the css file;

[CODE]#head-photo {maximum-width: 62.50em;
maximum-height: 14.70em;
margin: 0 auto;
background: url(http://www.what-do-christians-believ…/people_2d.jpg) no-repeat center scroll;
}[/CODE]

The html code for the image is;

[code=html]<div id=”head-photo”> ///also tried putting </div> here
</div>[/code]

You can see what happens[URL=”http://www.what-do-christians-believe.co.uk/test/author.css”] here.[/URL] The image in the text box is in the html file. For some reason the larger image was rejected and the validation said to use css instead.

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@cootheadOct 06.2012 — [indent]This problem has now been addressed in this post...
[list]
  • [*]http://www.webdeveloper.com/forum/showthread.php?265953-Division-background-colour-not-showing-behind-text-element&p=1226815#post1226815
  • [/list]

    [/indent]

    [i]coothead[/i]
    ×

    Success!

    Help @tony_webb spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.20,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...