Solved

Empty div not showing

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
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 …

830 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