html-lists

A CSS wildcard selector to match dynamic classnames?

我的梦境 提交于 2019-12-13 07:15:12
问题 I have a tasks list on my application. Some tasks have subtasks, which are attached to their parents on my html code through a property. These tasks are on a list (both parent and child tasks) in which there is no hierarchy of elements, just a plain <li> elements. The only attachment they have to the parent is the data-parent property. I want to apply a class to every element that shares the parent, it would be easy if the class names were static, but since it's dynamic, it's a bit more

HTML unordered list bullets and floating div's inside li on Webkit

半世苍凉 提交于 2019-12-13 06:27:52
问题 I have a simple unordered list with list-style-type: disc and with some li's that have each two floated div's. The problem is that only on Webkit browsers (Safari, Chrome...) the bullets appear to the right side of the list. See attached screenshot and this fiddle Here is the code: <ul> <li class="cf"> <span class="left">Text1:</span> <span class="left">00,00 €</span> </li> <li> <span class="left">Text2:</span> <span class="left">00,00 €</span> </li> <li> <span class="left">Text3:</span>

Hover doesn't work on nested ul in ie9

不羁的心 提交于 2019-12-13 05:59:21
问题 I have this website where on the left menu there's a nested menu on the "hotel" link. The submenu that appears hovering "hotel" has a gap on the left, but since in the gap the mouse hovers the nested "ul" element there are no problems in Firefox or Google Chrome. But this doesn't work in IE9 (not sure about other versions), infact I can't reach the submenu because it disappears. Is this a known bug? Am I doing something wrong? 回答1: IE9 is seeing the <ul/> padding-left or <li/> margin-left as

next prev in jquery list to show only 5 and hide others

浪尽此生 提交于 2019-12-13 05:15:33
问题 I am trying to do this. I fetch the list of DATE's from the table and show them as list and want the prev and next to traverse these date's showing only the 5 at any time. Example, while the page loaded, i will display the recent 5 date's and when prev / next are clicked let it traverse the "lists"(pre-populated from the table) and show accordingly. This is like pagination but i dont really want to use a pagination plugin as my requirement is very simple. when each list/href is clicked, it

How to add just crossorigin to <script> tag?

你说的曾经没有我的故事 提交于 2019-12-13 04:36:56
问题 How can I add just crossorigin to the following <script> tag? The goal is to only add the crossorigin and not added the anonymous or use-credentials attributes. Current output: <li><div id="somevalue"><script type="text/javascript" async src="some-source"></script></div></li> Desired output: <li><div id="somevalue"><script type="text/javascript" crossorigin async src="some-source"></script></div></li> (function() { var scriptTag = document.createElement('script'); scriptTag.type="text

Continuously add and remove class to a random element with jQuery

本秂侑毒 提交于 2019-12-13 04:33:28
问题 Let's say I have an unordered list of ten elements. I'd like a class to be added to one of them at random, and then remove that class after a couple of seconds and start again with another randomly chosen element indefinitely. What would be the cleanest way to achieve that? edit: What I've got so far: <ul id="hideAndSeek"> <li>...</li> <li>...</li> <li>...</li> <li>...</li> ... </ul> And the jQuery: var random = Math.floor(Math.random() * 1000); var shownElement = $("#hideAndSeek li");

Center image above list items

大憨熊 提交于 2019-12-13 03:57:27
问题 I am working on a project and having trouble with my UL>LI style. i am trying to put images all over the list and i want when i hover over the link the image color change so i use 2 images 1 orange & 1 blue but i am unable to centrise the images over top navigation links. the codes are : HTML: <div id="TopMenu"> <ul style="display:"> <li class="HeaderLiveChat" style="display:none"></li> <li class="First" style="display:"> <a href="/account.php">My Account</a> </li> <li style="display:"> <a

Make li elements stack horizontally

笑着哭i 提交于 2019-12-13 03:30:53
问题 I need the following li to stack against each other in a horizontal fashion like so: *li1 *li2 *li3 instead of: * li * li * li Pretty much the li elements would be aligned like a gallery with the lis to the right being hidden and scrolled as needed. Here is the JSFiddle 回答1: Add another container that handles the scrolling of its content Make the li be display: inline-block so they'll stack next to each other Set white-space: nowrap on the ul so the li elements will stay on one line in its

2 CSS columns spliing text into next column

天涯浪子 提交于 2019-12-13 03:22:00
问题 I have the following setup: <div id="albums"> <ul> <li> <a href=""> <img src="album1/cover/image/here" /> </a> <article> <h4>Album1 title</h4> <p>Album1 Description</p> </article> </li> <li> <a href=""> <img src="album2/cover/image/here" /> </a> <article> <h4>Album2 title</h4> <p>Album2 Description</p> </article> </li> </ul> </div> The list items are generated dynamically and displayed ten per page. I wanted to display them in two columns and display each list item as a block by itself. That

Printing down all row elements as tree in PHP

ⅰ亾dé卋堺 提交于 2019-12-13 01:40:30
问题 I built a database that has a table called "tasks". Table tasks is in charge of keeping tasks in order of their first entry date. Tasks table has a column named "parent". This parent column enables user to create a new task under another task. For example we have a task, its id is 21. When we create a new "child" task under 21th task, we set parent column of new task to 21; so that it implies that new task is a task under 21th task. I included an image of table so that it gets easier to