Solved

Why doesn't my text display?

Posted on 2012-12-27
1
237 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
[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
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

724 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