?
Solved

Empty div not showing

Posted on 2013-01-23
2
Medium Priority
?
368 Views
Last Modified: 2013-01-23
I have a div that is empty of content but does have a background image.  I would like the entire div to open so you can see the entire background image.

At the moment, it is not opening at all.

.index-amp	{
	width:50%;
	height:50%;
	left:0%;
	top:0%;
	float:left;
	clear:left;
	position:relative;
	background-image:url(../../img/items/index-amp-320.png);
	background-repeat:no-repeat;
	display:block;
	background-size:100%;
	z-index:0;
}

Open in new window

0
Comment
Question by:rgranlund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Assisted Solution

by:dj_alik
dj_alik earned 1000 total points
ID: 38811596
if you set height in pixels  units it will  work.
also  check your background-image:url path.
0
 
LVL 30

Accepted Solution

by:
LZ1 earned 1000 total points
ID: 38811654
You do have to set a height if you want it to display. But if it's supposed to be empty then why not just place the image inside the div and avoid the background?
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question