Solved

How to hide <li>?

Posted on 2008-10-23
5
3,036 Views
Last Modified: 2013-11-19
Hi, I want to hide <li>, I did like this:
<li id="liItem" class="visibility:hidden" >Item</li>
But does not work.
Any ideas?
0
Comment
Question by:Abdu_Allah
  • 4
5 Comments
 
LVL 21

Accepted Solution

by:
silemone earned 500 total points
ID: 22786626
change class to style =
0
 
LVL 21

Expert Comment

by:silemone
ID: 22786632
<li id="liItem" class="visibility:hidden" >Item</li>

should be

<li id="liItem" style="visibility:hidden" >Item</li>
0
 
LVL 21

Expert Comment

by:silemone
ID: 22786643
even better:
instead of visibility, use: display
visibility still leaves the space where the li will later appear
use

<li id="liItem" style="display:none;" >Item</li>
0
 
LVL 82

Expert Comment

by:hielo
ID: 22786653
visibility will leave a gap. If you do not want that use the display property instead:
<li id="liItem" style="display:none;">Item</li>

Open in new window

0
 
LVL 21

Expert Comment

by:silemone
ID: 22786703
finally, the explanation:

'class' is used to look for non-inline styles...i.e... class = "theStyles"
then you would have:

<style type="text/css">
.theStyles
{
        //this is where you would place css
}
</style>


'style' is used for inline style i.e.   style="font-size:20; color:blue;"
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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 …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

706 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

18 Experts available now in Live!

Get 1:1 Help Now