Solved

Why does my text disappear?

Posted on 2016-07-22
5
48 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 9

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Button Css BootStrap 2 36
How can I do a Select All on this page? 8 36
Change color of modular 8 22
Target h5 of a div 3 8
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now