html-lists

Replace ul bullets with a button

假装没事ソ 提交于 2019-12-24 13:26:28
问题 Is it possible to replace ul bullets with a button? I know you can change to images with CSS but if I wanted an actual element? 回答1: This isn't possible as you asked, but you could, perhaps, emulate it: <ul> <li><button>some button text</button>List-element text.</li> </ul> And the following CSS: ul, li { list-style-type: none; } li { padding-left: 0; margin-left: 0; } li button { margin-right: 2em; } JS Fiddle demo. The success, or applicability, of this approach does, of course, depend

How to save HTML ul-li structure into javascript object

一个人想着一个人 提交于 2019-12-24 13:17:16
问题 i have this following html structure usilg ul and li. <ul class="treeview" id="productTree"> <li class="collapsable lastCollapsable"> <div class="hitarea collapsable-hitarea lastCollapsable-hitarea"></div> <span id="top1" class="">top1</span> <ul> <li class="collapsable lastCollapsable"> <span class="">mod1</span> <ul> <li class="last"> <span>bottom1</span> </li> </ul> </li> </ul> </li> <li class="collapsable lastCollapsable"> <span id="top2" class="">top2</span> <ul> <li class="collapsable

Get UL list content with jquery

二次信任 提交于 2019-12-24 12:45:29
问题 I need to get content from a UL list and then be able to use that to email. But I'm stuck on getting the ul list in jquery. I've searched and found the following: $(document).ready(function(){ $("#send").click(function() { //When trigger is clicked... var optionTexts = []; $("#thelist").each(function() { optionTexts.push($(this).text()) }); var text = '"' + optionTexts.join('"<br/> "') + '"'; $("#result").append(text); }); }); but this returns all contents inside the page :S Here's my ul list

Help with PHP recursive navigation list menu

匆匆过客 提交于 2019-12-24 12:44:13
问题 I am trying to add a dynamic recursive navigation list menu to a site of am working on. The scenerio is that the menu has 2 levels related by a parentid(preid). My issue is that I can display the 1st level list correctly, however I cannot get the second level to display properly. I am not sure where to add the UL and /UL tags for the second level. This is what I am after <ul> <li>Item 1</li> <li>item 2</li> <li>item 3</li> <ul> <li>sub item 1</li> <li>sub item 2</li> </ul> <li>Item 4</li> <li

use li element as a button

房东的猫 提交于 2019-12-24 11:03:29
问题 I have ul elements like below in my html <ul class="nav" id="loadCategories"> <li class="sub-menu"><a href="#">Search by category</a> <ul class=""> <li><a href="#">Food</a></li> <li><a href="#">Sports</a></li> <li><a href="#">Personal</a></li> </ul> </li> <li class="sub-menu"><a href="#">Search by city</a> <ul class=""> <li><a href="#">Mumbai</a></li> <li><a href="#">Bangalore</a></li> <li><a href="#">Personal</a></li> </ul> </li> </ul> Now I want to use a button just below this ul . But when

How to display comma delimited JSON value as a list?

廉价感情. 提交于 2019-12-24 09:29:00
问题 Say I have an array like this: var ARTISTS: Artist[] = [ { "name": "Barot Bellingham", "shortname": "Barot_Bellingham", "reknown": "Royal Academy of Painting and Sculpture", "bio": "Some bio here...", "friends": "James, Harry, Bob" } Is it possible to display values for the key “friends” as an unordered list where each friend would be it’s own list item, e.g.: <ul> <li>James</li> <li>Harry</li> <li>Bob</li> </ul> I do realize the "friends" would be better stored as a nested array in order to

Horizontal list formatting - separate ul from image

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 09:17:49
问题 I'm trying to get a horizontal list formatted so the image is on the left side of the ul . Here's an idea of what I'm aiming for (green is the image, the x , y , z labels are to help refer to portions of each part if it helps): But I can't seem to figure out how to keep my image 'separate' from the text part of the ul . HTML: <span class='row'> <ul class = 'top-ul'> <ul id="menu"> <li><h2><u>Colby Abbott</u></h2></li><br> <li><p id="email">Enos.Goyette@hotmail.com</p></li><br> <li><p id=

Styling HTML <li> elements: avoiding an invalid parent <div>

瘦欲@ 提交于 2019-12-24 08:18:39
问题 The situation: I have a site with a long list of questions across multiple pages. Each question is within a made up of a label and an input. Groups of question divs are within an additional div to provide grouping and bordering styles, etc. The problem: I want to number my questions, but want to avoid hard coding the numbering. However, it is invalid html to place the <li> inside the divs or labels. In addition some question divs are conditionally hidden and revealed depending on user input.

Workign with floating <li> elements in footer

余生长醉 提交于 2019-12-24 07:15:38
问题 My website is on the local server right now however this will be a simple fix for those of you who know whats it's called. I'm trying to get these lists (bordered in white) to float the the far left in the available space of the footer(bordered by black). This is my CSS #footer { width: 100%; height: 503px; background: url(img/FOOTER-bg.jpg) repeat-x; background-color: #821d20; position: relative; top: 100px;/*border: 1px solid #0C0;*/} #footer a { text-decoration: underline; color: #c7bd89;

CSS3 multiple backgrounds, one repeating in ul

柔情痞子 提交于 2019-12-24 03:38:32
问题 I am working on a Wordpress template. I am trying to implement 3 background images to be used for each <li> in the nav menu, which is generated dynamically. Take a look at the two examples. http://preahkumpii.com/misc/test01/hi.html http://preahkumpii.com/misc/test02/hi.html First Example CSS: .menu-item li { background-image: url(images/menu-left.png), url(images/menu-right.png), url(images/menu-center.png); background-position: left, right, center; background-repeat: no-repeat, no-repeat,