Solved

How to hide <li>?

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
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 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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

739 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