Solved

Why does my text disappear?

Posted on 2016-07-22
5
52 Views
Last Modified: 2016-08-08
Here's my CSS:

.box
{
    width: 600px;
    height: auto;
	max-height:700px;
    background: #FFF;
    margin:auto;
    left: 50%;
    top: 50%;
    z-index: 150;
    display: none;
	position:fixed;
	margin-top: -300px; 
	margin-left: -300px;
	text-align:left;
	padding-bottom:35px;
	font-size:10pt;
	overflow:auto;
	border-radius:10px;
}

.box .tooltip 
{
    font-weight:bold;
}

Open in new window


Here's my html:

<div class="box">
<table>
<tr>
<td><div class="tooltip">hello</div></td>
</tr>
</table>

What you see renders like this:

not working
You'll notice under "Hinge Direction" there's a blank space just above the pulldown menu.

Now, look at what happens when I change the div from "div class="tooltip"> to <div style="font-weight:bold;">

does work
Now you see the text.

I think I'm making a mistake somehow in my CSS hierarchy, perhaps? I don't know. What am I missing?

Thanks!
0
Comment
Question by:brucegust
5 Comments
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 125 total points
ID: 41725508
It's hard to say without seeing your full code, but your example will not show anything because your box class has  display: none;. That means anything in the box class will not show up.
0
 
LVL 22

Assisted Solution

by:Kim Walker
Kim Walker earned 125 total points
ID: 41725572
You've only given us half the picture. Somewhere you have a div with a class name of tootip. You have CSS that assigns the font-weight for the contents of any element with a class name of tootip that is a descendant of any element with a class name of box. And the ancestor element with the class name of box has several style properties which includes display: none;.

So based on the CSS definitions, a div with a class name of tootip which is a descendant of any element with a class name of box would be the descendant of a hidden element and therefore hidden as well. But its hidden content would be bold.

Is the div in question the descendant of an element with the class name of box and which content in the screen capture represents the content of this div? Is it the word "hello"?
0
 
LVL 49

Accepted Solution

by:
Roonaan earned 250 total points
ID: 41725610
Please debug this by right-clicking (depending on your platform) and pressing "inspect element". Then see which CSS rules are in effect that might hide your element.

As mentioned by other experts, most likely there is code in play that is not part of the example code you have shown.

Then a personal side note. What is going on with the capitalization in your labels? Using capitals for every word is intentional?

Best,

-r-
0
 
LVL 10

Expert Comment

by:Prasadh Baapaat
ID: 41725611
I agree with Scott and KIm... give us link to the page instead of screenshots so we can help...
0
 

Author Comment

by:brucegust
ID: 41747574
I was able to figure it out, gentlemen. Thanks for your help!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

778 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