Perhaps the easiest way to create a CSS style text navigation bar is to put all the links in one line of text, which seems reasonable and intuitive. But the problem is that putting all the links in one line of text makes it hard to control the gaps between the links and the front and back. So, in order to avoid all the links being squeezed together, you end up usually having to insert something or a newline of whitespace to separate the text so that it doesn't mix.Now our normal practice is to a
Perhaps the simplest solution to creating a CSS style text navigation bar is to put all links in one line of text. This method looks reasonable and intuitive. But the problem is that it is difficult to control the gaps between links and between the front and back of links by placing all links in one line of text. Therefore, in order to prevent all links from being crowded together, you usually have to insert some blank characters or non-wrap characters to separate them, so that these words are s
Why define the ul {margin: 0; padding: 0;} selector in the css file?
Why define the ul {margin: 0; padding: 0;} selector in the css file?
Ul labels have padding values by default in FF, while only margin has default values in IE. What are the default values of padding and margin in the following views?
IE effect:
IE result: margin-left: The default va
The navigation bar consists of graphical images placed in a row of table units or text in cells, since it is no longer recommended to use tables to locate any non-Table Page Content, many Web users are looking for new methods to create navigation bars using structured XHTML tags and CSS formats. This method is also more friendly to search engine spider, which is very important for us.Perhaps the simplest solution to creating a CSS style text navigation bar is to put all links in one line of text
float float using the list UL featureIt is necessary to say the principle of operation. For consistency, the table is made up of red parts, meaning that the other part of the cell is 0px, which eliminates the overlap of borders. Finally, the right and top borders are missing, defining a large div to fill. This completes a thin Line table with a 1px border. The specific style can be determined by defining the width of the cell.Open the DW and create a
The simplest way to create a CSS-style text navigation bar might be to put all the links in one line of text, which looks reasonable and intuitive. But the problem is that it's hard to control the gaps between links and back and forth by putting all the links in one line of text. So, in order to avoid all the links being squeezed together, you end up having to insert something or a non-newline blank character as a separator to separate the text from the mix.
It is now normal for us to use the
Recently made a oblog system template, which involves the UL, so I sorted out this article + this big picture.
UL is a very common label, but because of its different performance under the Firefox and IE, people feel that it is a very difficult to control the label.
UL in Firefox has a padding value, but there is no margin value, and in IE, the opposite,
When loading the list, jquery gets the first li attribute in ul, jqueryul
When the list is loaded, the first one is selected by default. ID of ul for top_menu
You can use $ ("# top_menu li: first") to obtain the first li tag under ul. Then you can use
For example, modify attributes: $ ("# top_menu li: first"). attr ("class", "select ");
Trigger event: $ ("# t
Label:Method 1: function Insert ()
{
var str= "";
var data= "Your database Data";
str= ";
document.getElementById ("test"). InnerHTML = str;
} onload= "Insert ()">
id= " Test ">
div>
Body > Method 2:js directly assigns a value to your Li tag: function insert () { var data= "Your database Data" "test"). InnerHTML = data;} onload= "Insert ()">
ul>
ID= "Test">
Li >
ul >
Body > Php Method:
JS Gets the element under all LivarContent=document.getelementbyid ("content");varItems=content.getelementsbytagname ("ul");varitemss=items[2].getelementsbytagname ("Li");//get a second Li tagorvarDiv=document.getelementbyid ('a');varUl=div.childnodes.item (0);varlis=Ul.childnodes; for(varI=0; i) {alert ("Item"+i+": "+Lis.item (i). InnerHTML);} How to use jquery to get the last li$ under each UL (function (
OL, ul {padding-left:40px;}
and the default style of IE is:
OL, ul {margin-left:30pt;}
is Opera 8 or the previous version the same as IE? Interested comrades can test on their own.
But that at least suggests that the list's indentation should be controlled using padding, in addition to Microsoft's browser makers agreeing. In fact, this is very good to understand, indentation is every item rather than th
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
This article mainly introduces how to dynamically add and delete UL node LI in JS and related content. For more information, see
The Code is as follows:
111111111111111del
22222222222222222del
333333333333333del
44444444444444444del
555555555555555del
Please select 11111 22222 33333 44444
Script
Function $ (id ){
Var obj = document. getElementById (id );
Return obj;
}
Function del (n ){
$ ('
The TreeView plug-in is obtained from here, the downloaded file has the demo, see the Demo folder inside the index.html file is almost know how to use the control, in my project to use the part of the Code as follows (refer to the following JS file before referring to the jquery file):DivID= "Project_list1"> ulID= "Browser"class= "Filetree"> Li>spanclass= "folder">Folder 1span>
Front CodeJsUse the jquery effect to show your mouse to the province's 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
Looking for Li how to arrange horizontally and automatically fill ul, while Li width average? Information, there is a reference to "please use JS dynamic calculation to ensure compatibility",Because I want to achieve is, the horizontal scroll bar, UL's superior div is fixed width of 1000px, I think with jquery to get each Li's height, the width of the UL is equal to the width of each li.1 DOCTYPE HTML Publi
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.