html-lists

next() not picking up an inner UL with “display: none” in IE7

ⅰ亾dé卋堺 提交于 2019-12-11 08:19:37
问题 This is happening with the following markup: <ul id="sideMenu" class="menuFontStyle"> <li class="category">Test</li> <ul class="secondLevel" style="display: none;"> <li></li> </ul> ... In FF and Chrome the inner UL is being picked up but IE7 seems to be skipping to the next li. What could serve as a workaround? This is with a custom accordion script. 回答1: Your ul is not inside the li as you have closed the li before opening the ul . I don't think this is what you want. Then, to access the <ul

changing the font to bold on a HTML unsorted list when clicked

只愿长相守 提交于 2019-12-11 06:44:03
问题 I have a HTML unsorted list which I capture its “on click” event. When a list item is clicked on I want to change that items font setting to bold so that the user gets a visual indicator that it’s been selected. Is this possible? 回答1: <li onclick="this.style.fontWeight= 'bold'">​​​​​​​​​​​​​​​​​​​​​​​​​​​ Or do you want to change it back to regular when another li is clicked? I think you should use jQuery then (it's possible in regular javascript but this is just so much easier) $('li').click

Select only the most nested list item with specific class

天涯浪子 提交于 2019-12-11 06:06:08
问题 I need to select only the the deepest li.active in the ul structure. In this case that would be Další kategorie . I cannot find css only solution. Is it even possible? Thanks. <nav class="smenu"> <ul> <li class="predsednictvo first"><a href="/cs/csmg/predsednictvo/"><span>PŘEDSEDNICTVO</span></a></li> <li class="sub active komise"><a href="/cs/csmg/komise/"><span>KOMISE</span></a> <ul> <li class="kategorie first"><a href="/cs/csmg/komise/kategorie/"><span>Kategorie</span></a></li> <li class=

Li element breaking content even with display block

人走茶凉 提交于 2019-12-11 05:37:12
问题 I have a drop down menu and obviously, some items are larger than other, so the UL needs to increase it's width and fit the item, this is not happening on my menu. Check this fiddle: http://jsfiddle.net/U9h26/ On the 2nd and 3rd menu, there is a list of elements, the last element which is the bigger one breaks the line, I have set the UL to width auto, display block or inline block, and nothing works except when I set a value for the subnav LI, then it works, I don't want to do this way cause

display:table in <ul><li> to get vertical-align:middle of <a> item produces Chrome/Chromium issue?

烂漫一生 提交于 2019-12-11 05:36:02
问题 On a <nav> bar layout I used display: table on the parent <ul><li> item and display: table-cell on the child <a> item to be able to use vertical-align: middle on the <a> item. (Some items are multiline, so setting line-height is not a possibility). On Chrome/Chromium I get the whole <nav> bar 'shifting' to the right when I hover over menu items (only when they have children). This doesn't happen on Firefox. Load the jfiddle in both browsers and see: http://jsfiddle.net/qcQKP/2/ Does anyone

list displaying slightly off centered

北慕城南 提交于 2019-12-11 04:54:46
问题 I can't seem to figure out why my list is displaying slightly off center. I have some text below it in the same container that is 100% centered but the list seems to be padded slightly form the left. I am a novice at CSS, so perhaps someone can point where I've gone wrong. Much appreciated! Here is the HTML <div id="footer_menu"> <ul id="navlist"> <li><a href="#">HOME</a></li> <li>|</li> <li><a href="#">ABOUT</a></li> <li>|</li> <li><a href="#">ARCHIVE</a></li> <li>|</li> <li><a href="#">GET

CSS ul li bullet disappear [closed]

女生的网名这么多〃 提交于 2019-12-11 04:28:51
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . ul and li in my webpage not work at all. here is my index.html <div id="main" class="core"> <div id="background"> </div> <div id="content"> <div id=

jQuery, jScrollPane on UL

十年热恋 提交于 2019-12-11 04:19:51
问题 I cannot make this work for some reason. I want jscrollpane to be used in an unordered list (ul). I have managed to do this by itself but when used with a nested ul it does not seem to work. I have uploaded my example to jsFiddle so anyone can take a look and fiddle around. You can have a look here: http://jsfiddle.net/44db/eAX8b/ 回答1: I posted this answer yesterday but on the wrong question! Here it is on the right question: You shouldn't apply jScrollPane directly to a UL. Because

Style an Ordered List like “X.X” based on list start attribute

笑着哭i 提交于 2019-12-11 03:51:52
问题 I would like to style an ordered list like this for a client, but am not sure exactly how. The client wishes to have a policy page, with several sections. Each section has several statements, which are numbered like so: "x.1, x.2" (where "x" is dependent on the section number). Here is what the HTML looks like for the sections: <div class="customListBox"> <h2>Section 1</h2> <ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol> <h2>Section 2</h2> <ol> <li>Item 1</li> <li>Item 2</li> </ol>

Filtering and paging

孤街浪徒 提交于 2019-12-11 03:27:04
问题 Hi people thanks for the help. Im trying to implement a simple pagination that filter, hiding li's by class. The example is here. I'm new in this but with some help the main idea is working. The only problem is that when i click to filter i wanna paginate just the li's in that category. So if i click in the "category 1" link, the li's with the class "category-2" should be hide and NOT APPEAR when i click next o prev. HTML <div class="filter"> <a href="#category-1">category 1</a> <a href="