html-lists

Split PHP loop into 2 lists

拜拜、爱过 提交于 2020-01-15 10:41:09
问题 I have built the following function, but is it possible to get it to split my lists from one into more so I can have a maximum of 8 <li> 's per <ul> ? function buildProductsMenu($base) { $sql = "SELECT * FROM tbl_category"; $result = dbQuery($sql); while ($row = dbFetchAssoc($result)) { echo "<ul>"; echo "<li class='title'>$row[cat_name]</li>"; $sqlProd = "SELECT * FROM tbl_product WHERE cat_id = $row[cat_id]"; $resultProd = dbQuery($sqlProd); while ($rowProd = dbFetchAssoc($resultProd)) {

Excel-friendly html: keeping a list inside a single cell

こ雲淡風輕ζ 提交于 2020-01-15 10:07:40
问题 I know that when generating html that needs to be viewed in Excel, if I want to ensure that <br> tags don't cause a new row to be generated, I can specify <style><!--table br {mso-data-placement:same-cell;} --></style> In the <head> section. What do I need to do if I want the same behaviour for lists (i.e. for content inside of <ul> or <ol> sections to be contained in the same cell)? 回答1: As many of you probably know, you can output data (a report, for example) as an Excel file, simply by

Border over borders CSS List <ul>

瘦欲@ 提交于 2020-01-15 08:56:05
问题 I am facing a problem with edges in a css list ( <ul> , <li> ). The problem that when I set the left edge with a color and a different thickness, the lower edge of overlapping ends as shown in the screenshot below: In the picture there to see the right, so here I leave the fiddle to anyone who can give me help in this situation. http://jsfiddle.net/Igaojsfiddle/T6KrE/31/ #contactList > li { font-weight: bold; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); background-image:

assigning css class to a masterpage control from contentpage in asp.net

左心房为你撑大大i 提交于 2020-01-14 19:26:04
问题 I have a unordered list in my master page.... <ul id="mainMenu" runat="server"> <li id="mainHome" runat="server"><a href="#" title="Home" class="home"> <span></span>Home</a></li> <li id="mainManage" runat="server"><a href="Users.aspx" title="Manage" class="manage"><span></span>Manage</a></li> <li id="mainEnquiry" runat="server"><a href="account.aspx" title="Enquiry" class="enquiry"><span></span>Enquiry</a></li> <li id="mainReport" runat="server"><a href="EnquiryReport.aspx" title="Report"

Select first nested child in list but not subchilds

蓝咒 提交于 2020-01-14 08:48:30
问题 I have a unordered list like: <ul> <li>Element one <ul> <li><a>Element two</a> <ul> <li><a>Element three</a></li> </ul> </li> </ul> </li> </ul> Now if I try to select the <a> -element of "Element two". I would do it like the following: ul ul li:first-child > a This will select also the following nested <a> element. See this fiddle: http://jsfiddle.net/38ksdpw3/ How can this be solved? 回答1: You probably need to add an identifier to the first <ul> element and then walk through the children tree

Opera OL bad text align with justify

你离开我真会死。 提交于 2020-01-14 05:16:08
问题 I'm having a problem with justify alignment of list items ( <li> ) in an ordered list ( <ol> ) in Opera . There are different spacings in front of the lines. Opera version: Version: 11.62 Build: 1347 Platform: Win32 System: Windows 7 Screenshots: (reproduced at jsfiddle.com) Test code: http://jsfiddle.net/ySmJZ/ ol { list-style: decimal; margin: 16px 0px; padding: 0px 0px 0px 40px; text-align: justify; } 回答1: It's a known bug in Opera (CORE-41499). There isn't really a workaround, except to

How do I add draggable List Items from the result of a .ajax GET?

旧城冷巷雨未停 提交于 2020-01-14 03:20:13
问题 I want to be able to add my own items to a draggable list from an array of products returned from an .ajax call, based on the shopping cart example at http://jqueryui.com/demos/droppable/#shopping-cart. I've tried a number of variations of appending, etc. to get them into the list, all of which get them to "appear", but are not draggable. I've been googling this for a couple of days, and am not finding a clear explanation of how to accomplish it. I keep finding answers about .live, but that

Text Shadows on counter or bullet in list

旧街凉风 提交于 2020-01-13 11:27:07
问题 I want to know how to add text-shadow to an ordered list </ol> . I've tried, the following example but it doesn't work. body { text-shadow: black 0.1em 0.1em 0.2em; color: gray; background: white; } ol { text-shadow: black 0.1em 0.1em 0.2em; } Ordered Lists <ol> <li>content</li> <li>content</li> <li>content</li> </ol> My issue it tahe the list counter doesn't have the text shadow . I need to add text shadow to the number in the ordered list, like the 1. , or 2. , etc. By the way, I want it to

li :before content: “✔ ”; different color on some mobile devices

允我心安 提交于 2020-01-12 09:37:13
问题 I write css to make li tags better. Everything is ok on laptop and my mobile phone(lenovo vibe 1) and asus zenfone 5 But when Itested on Iphone 5 and Galaxy Note3 my color (rgb(240, 230, 140)) shown as red and black. I don't know what is wrong with my css. Should I use image istead of css or Is there a solution with css? Thanks. Here is my css: ul.anamenu li::before { content: "✔ "; color: rgb(240, 230, 140); font-size: 4vmin; text-indent: -2em;} 回答1: Try to add font-family: 'Zapf Dingbats'

How to indent list items using CSS when you have floating blocks?

狂风中的少年 提交于 2020-01-12 07:16:04
问题 I observed a relative strange behavior when I use floating images in a document. The list items indentation is made relatively to the 'red line' instead of the 'green' one. Why is this happening and can I solve this? <img style="float: left"> <p>some text</p> <ul> <li>aaa</li <li>bbb</li </ul> <p>some other text</p> 回答1: Just add ul { list-style-position: inside; } because by default it is set to outside, not sure why. 回答2: I think you probably need to change the list style position to inside