Solved

How to hide <li>?

Posted on 2008-10-23
5
3,051 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
[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
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

707 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