Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Struggling with some HTML

non123

New Coder
Code:
<div id="close_div" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url('images/bg_close.jpg'); background-size: cover; z-index: 9999; display: none;"></div>

I'm a beginner with code and am editing a web page, when I open the page no image shows, do you know why?

The image is uploaded all fine in the correct folder.
 
@non123 Get rid of the display: none. That stops the image from being displayed :). So your code should look like this:
HTML:
<div id="close_div" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url('images/bg_close.jpg'); background-size: cover; z-index: 9999;"></div>
 
@non123 Get rid of the display: none. That stops the image from being displayed :). So your code should look like this:
HTML:
<div id="close_div" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url('images/bg_close.jpg'); background-size: cover; z-index: 9999;"></div>
Thank you for the advice, it shows the picture now, but not how I want it to look.

I am doing a quiz and on the last page, I want the image to be on the background of the last page.. so annoying.
 
The best thing to do then would be to apply the background image CSS to the body tag instead. That should apply it as a background for the whole of the last page. If that doesn't resolve it, could you share the code for the whole page?
 

Latest posts

Buy us a coffee!

Back
Top Bottom