?
Solved

Why doesn't my text display?

Posted on 2012-12-27
1
Medium Priority
?
239 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 2000 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

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.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

800 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