Solved

Empty div not showing

Posted on 2013-01-23
2
367 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 250 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 250 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

729 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