Solved

Why doesn't my text display?

Posted on 2012-12-27
1
233 Views
Last Modified: 2013-01-02
I am trying to understand why text is not displaying correctly.  I have created a test page that illustrates my problem.  This can be viewed at: Test Page

Sample page, the first box should display 'Title' at the top
Each of the 4 squares should display the word 'Text' at the top.  The only difference is that the 2 boxes on the right do not have a background color set in the style and the two on the left do.  I do not understand why the text 'Title' is not being displayed in the first box.

Any help that you can provide me that explains what I am doing wrong is very much appreciated.

Here is the code that is being used to display the page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
ul.thumb {
	list-style: none;
	float: left;
	padding:0;
	margin: 0; 
	width: 560px;
}
ul.thumb1 {
	list-style: none;
	float: left;
	padding:0;
	margin: 0; 
	width: 560px;
}
ul.thumb li {
	margin: 0; padding: 5px;
	float: left;
	position: relative;  
	width: 174px;
	height: 88px;
	height: 128px;
}
ul.thumb1 li {
	margin: 0; padding: 5px;
	float: left;
	position: relative;  
	width: 174px;
	height: 88px;
	height: 128px;
}
ul.thumb li img {
	width: 174px; height: 88px; 
	border: 1px solid #000000;
	padding: 5px;
	background: #f0f0f0;
	position: absolute;
	left: 0; 
	top: 0;
	padding-top:40px;
}
ul.thumb1 li img {
	width: 174px; height: 88px; 
	border: 1px solid #000000;
	padding: 5px;
	position: absolute;
	left: 0; 
	top: 0;
	padding-top:40px;
}

img.notsel
{
	opacity: 0.4;
	filter: alpha(opacity=40);
}

</style>
</head>

<body>
<div class="thumbinfo">
	<ul class="thumb">
		<li>
			<div class="TempName">Title</div>
			<img src="test.png" alt="1" />
		</li>
		<li>
			<div class="TempName">Title</div>
			<img class="notsel" src="test.png" alt="2" />
		</li>
	</ul>
	<ul class="thumb1">
		<li>
			<div class="TempName">Title</div>
			<img src="test.png" alt="1" />
		</li>
		<li>
			<div class="TempName">Title</div>
			<img class="notsel" src="test.png" alt="2" />
		</li>
	</ul>
</div>
</body>
</html>

Open in new window

0
Comment
Question by:WestCoast_BC
1 Comment
 
LVL 1

Accepted Solution

by:
Omar_El_Sergany earned 500 total points
ID: 38725419
the image is on top of the text div
you need to add z-index attributed for the image and give it a lower number

modefy the CSS file to be :

ul.thumb li img {
    background: none repeat scroll 0 0 #F0F0F0;
    border: 1px solid #000000;
    height: 88px;
    left: 0;
    padding: 40px 5px 5px;
    position: absolute;
    top: 0;
    width: 174px;
    z-index: -1;
}

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
css, html 5 42
How to get this page layout correct 13 29
Using jQuery to set a DIV attribute on page load 9 30
SlickNav Menu Plugin Not appearing on mobile 6 33
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
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).

776 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