How to achieve the horizontal arrangement of UL and remove Li that annoying point, now find a way to share with you, interested friends can refer to, for a rainy
Today do Web page is always do not know how to achieve the horizontal arrangement of UL and remove Li that annoying point, now find a way, make a note:
Copy Code code as follows:
#ul {
Float:left;
}
#
This is the content of the menu, with the UL tag to implement the menu:
Copy Code code as follows:
This is the CSS control code:
Copy Code code as follows:
ul,ol,li{list-style:none;padding:0px;margin:0px;}
#menu *{line-height:30px;}
#menu a{
Text-decoration:none;
Display:block;
}
#menu ul{
Text-align:left;
Background: #3
This is the menu content. Use ul label to implement the menu:Copy codeThe Code is as follows: This is the CSS control code:Copy codeThe Code is as follows:Ul, ol, li {list-style: none; padding: 0px; margin: 0px ;}# Menu * {line-height: 30px ;}# Menu {Text-decoration: none;Display: block;}# Menu ul {Text-align: left;Background: #333;}# Menu. arrow {/* The right arrow of the menu item */Float: right;Padding-r
If we just get one of the first Li in UL, then we can write this:
$ ("ul Li:first");$ ("ul Li"). EQ (0);$ ("ul Li").$ ("ul Li"). Slice (0,1);//slice the position at which the first parameter represents the selection, and the second argument is the ending position
Li will always have a small black dot in front of the default display, which can be cleared in the following ways. 1. Write code in CSS UL Li{List-style-type:none;}2, find the head section on the relevant page to write the following code 3, add list-style within Li,ul . such as my Blog Course this is a lot of trouble. List-style-type its properties : None do not use bulletsDisc solid Circle, default
List UL or ol have a preset mark, this mark may be a real dot dot, or it may be a number. In practical applications, we need to get rid of this preset tag, but we don't know where the preset tag is. Because IE and FF seem to deal with the UL preset tags have a different way: We write a UL HTML code structure:
HTML structure:
Run Code Box
[Ctrl + A ALL SELECT h
JS gets the elements underneath all the LI
var Content=document.getelementbyid ("content");
var items=content.getelementsbytagname ("ul");
var itemss=items[2].getelementsbytagname ("Li");//Get second Li label
Or
var Div=document.getelementbyid (' a ');
var ul=div.childnodes.item (0);
var lis=ul.childnodes;
for (Var i=0;i
How to use jquery to get each
The CSS UL Li Center originally thought very easy to realize, because the usual is to let Li Float:left, so that the back can line up, the center did not do the request, but recently engaged in a project, must let the UI of each Li are centered, this can make me difficult, did not think that I was hard to break, But I solved it. The following method:
My method is mainly to use Li's floating fixed width to achieve, Li's default display for block, this
Under the UL, the direct nesting div, in IE7 previous version, will appear the condition is: the DIV will be close to its nearest Li wraps.Please see Dome
Copy Code code as follows:
The IE7 and previous versions will be loaded into Li with text 5.
Under GoogleIn the IE7 document mode, the div is added to the Li that is closest to it.So, UL does not support the direct nesting div.
1, in the IE7 and the following version, the UL can not appear in the non-Li tag, if the appearance of non-Li tags, then the browser will automatically put the non-Li tag with its proximity to the Li tag wrapped, become the content of Li.
Yesterday did a page, IE7 and IE6 did not carry out the test, the results of the business report problem, given the problem page screenshot, a look to know, should be IE problem, with IE8 access no problem, but IE7
Article Introduction: In the ul of Li's height in IE6, IE7, IE8, FF under the incompatibility Question solution method.
In the page sometimes use the UL Li list when IE6, IE7, IE8, FF height will be different (which IE6 and IE7 height, IE8 and ff height), set high after using Overflow:hidden; and it doesn't matter, this question has been bothering me, So that I can only use div to do the list,
When you load a list, you want to select the first one by default. Top_menu is the UL ID
Through $ ("#top_menu Li:first") can get to the UL under the first Li tag. And then you can use
For example, modify attributes: $ ("#top_menu Li:first"). attr ("Class", "select");
Trigger Event: $ ("#top_menu Li:first"). Click ();
If you want to get a label under Li, as follows:
$ ("#top_menu Li:first a")
You can
For a lot of people use Div to do the site, always use, but in the display of the effect there will always be a small black spot, this makes a lot of people headache, but can not find the source, others we may use the following methods to clear.1. Write code in CSS. Find the relevant CSS, write List-sytle:none under. Li and. UL; of course, some of them write list-style-type:none, which is especially common in some CMS.2, find the Head section on the r
This article mainly introduces about the CSS control of the UL LI style analysis, has a certain reference value, now share to everyone, the need for friends can refer to
P+CSS, we use the most is UL Li to display data, such as news buttons. Below to give you a CSS ul Li example for learning
Css:
#menu ul {list-style:
CharactersKatakana-iroha:css2 not supported. Japanese Katakana Serial NumberLower-latin:css2 not supported. lowercase Latin alphabetUpper-latin:css2 not supported. Uppercase Latin alphabet
-------------------
The format of the Li code:
A). Use CSS to format list characters:
UL li{List-style-type:none;}
B). If you want to change the list character to an image:
UL li{List-style-type:none; List-style-image:ur
Reception CodeJsUse jquery to display the mouse to the province UL drop-down display$ ("#province"). Hover (function () {$ ("#province ul"). Toggle ();})Use the jquery effect to show your mouse to the city's UL drop-down display$ ("#city"). Hover (function () {$ ("#city ul"). Toggle ();})Use the jquery effect to show y
Today's problems really make people have to spit, because a very small problem, it took a half a day to solve the problem. Always think that their HTML and CSS understanding should be pretty good, but the things I met today let me have to reflect on their own learning mentality error. HTML and CSS problems are big problems, because once the layout of the error, often not their own code is not a problem, but their own concept of a browser does not understand the resulting error. This tells us tha
The format of the Li code: A). Use CSS to format list characters: ul li{ List-style-type:none } B). If you want to change the list character to an image, then: UL li{ List-style-type:none List-style-image:url (/blog/images/icon.gif); } C). To align Left, you can use the following code: ul{ List-style-type:none margin:0px; } D). If you want to add a backgrou
A tag is actually used to make a jump.The role of a tag: page jump, anchor (page is a bookmark-like thing, in the URL to show #)Traget = "_blank" This property means that after clicking on the new window opens the connection, if no change is meant to be opened directly on this page.href=# Plus Tag numberIMG TagsIf clicking on the image requires a hyper-connected jump function, the implementation is as follows:Property:SrcTitleAltStyleUL Label: A point is shown in front of the list content.The nu
A plus Display:blockDOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">HTMLxmlns= "http://www.w3.org/1999/xhtml">Head>Metahttp-equiv= "Content-type"content= "text/html; charset=gb2312" />title>Untitled Documenttitle>styletype= "Text/css">Ul,li{margin:0;padding:0;font-size:12px;}ul{Overflow:Hidden;Zoom:1;}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.