html-lists

Wordpress Posts odd/even Li layout

你说的曾经没有我的故事 提交于 2021-02-19 23:51:27
问题 I am working on a custom theme and on one of the pages i need to style the posts pages as follows: http://gyazo.com/e1f7cfc03c7ba3981188077afcdf0314 The grey box is an image and the red box is content. I need to use perhaps an odd/even Li/Ul pseudo class/selector but i have no idea how to do it. Could anyone offer me a way to start it up? I was thinking of using the Odd/Even pseudo class on UL to change the divs names however i can't think how to do it or where to start. Thanks! Edit: I am

Wordpress Posts odd/even Li layout

瘦欲@ 提交于 2021-02-19 23:49:51
问题 I am working on a custom theme and on one of the pages i need to style the posts pages as follows: http://gyazo.com/e1f7cfc03c7ba3981188077afcdf0314 The grey box is an image and the red box is content. I need to use perhaps an odd/even Li/Ul pseudo class/selector but i have no idea how to do it. Could anyone offer me a way to start it up? I was thinking of using the Odd/Even pseudo class on UL to change the divs names however i can't think how to do it or where to start. Thanks! Edit: I am

Make select option selected based on an unordered list using jQuery

陌路散爱 提交于 2021-02-18 23:42:03
问题 I've converted my unordered list into a select option list, however I'm not sure how can I make the 'selected' attribute added the option which correlates to the same hyperlink in the list. Mark-up <div class="navigation"> <ul> <li><a href="foo.html">Foo</a></li> <li><a href="bar.html" class="selected">Bar</a></li> <li><a href="boo.html">Boo</a></li> </ul> </div> Javascript $('<select />').appendTo('.navigation'); // Populate dropdown with menu items $('.navigation ul a').each(function() {

Make select option selected based on an unordered list using jQuery

我们两清 提交于 2021-02-18 23:38:07
问题 I've converted my unordered list into a select option list, however I'm not sure how can I make the 'selected' attribute added the option which correlates to the same hyperlink in the list. Mark-up <div class="navigation"> <ul> <li><a href="foo.html">Foo</a></li> <li><a href="bar.html" class="selected">Bar</a></li> <li><a href="boo.html">Boo</a></li> </ul> </div> Javascript $('<select />').appendTo('.navigation'); // Populate dropdown with menu items $('.navigation ul a').each(function() {

Displaying dynamically created lists in different columns

老子叫甜甜 提交于 2021-02-17 06:35:08
问题 I have some list of vendors in my site, those vendors list are created manually. Live Site Those links are displaying in one single column div code <div class="rte"> <ul class="vendor-list block-grid three-up mobile one-up"> <li class="vendor-list-item" style="font-size:20px"> <a href="/collections/{{ product_vendor | handleize }}"> {{ product_vendor }} </a> </li> </ul> </div> But i wanted to display this list in 3 columns. For example, if i have 30 vendors then show 10 vendors for each

Indent on second line of <li> text

两盒软妹~` 提交于 2021-02-17 05:34:47
问题 I need to use both discs and list-style-type: lower-roman; to style a list. But because I'm using content: "•"; in a :before pseudo element to create the disc effect, the second line of the <li> text does not line up. Is there an easier way to do this? eg: i•Some list text which goes onto the second line //need this to be in line with the text above i sub list text1 ii sub list text2 I'm currently using ul>li:before { content: "•"; } ol{ margin-left: 24px; } ol, ul{ list-style-type: lower

Using JQuery to split a <ul> in 2

孤街浪徒 提交于 2021-02-11 12:47:31
问题 Hi I have a list of unordered elements. When clicked I would like to insert a <p> element whilst splitting the <ul> in 2. The problem being that $("</ul>"+text+"<ul class=\"test\">").insertAfter(element); seems to separate the <p> element from the <ul> elements, inserting the <p> first then the <ul> tags. I would also like to remove the opening and closing <ul> immediately before and after the .temp element so I can split the <ul> in different spot. This was the only method I could find but

generate Jquery Multilevel menu list with ul li

烈酒焚心 提交于 2021-02-07 19:51:34
问题 ...images ......|vertical ......|horizontal ...Jquery ......|UI ......|include ...quickfox Array to process: I have folder structure Like above.And it is stored in array dirs. see below var dirs = [ "images", "images/vertical", "images/horizontal", "Jquery", "Jquery/UI", "Jquery/include", "quickfox" ]; Objective: How Can I make nested ul li as below. <ul id="categorymenu"> <li>images </li> <ul> <li>vertical</li> <li>horizontal</li> </ul> <li>Jquery</li> <ul> <li>UI</li> <li>include</li> </ul>

HTML, overflow:scroll, and float

只谈情不闲聊 提交于 2021-02-07 11:59:39
问题 I have a div that encapsulates many unordered lists (ul). I have each ul set to "float:left". And I also have the parent div that contains them set to "overflow-x:scroll". What's happening is the ul's are wrapping when they hit the edge of the page and not staying side by side to take advantage of the scrolling property of the parent div (the scroll bars are there). Why? How can I fix this? Thanks for any help. 回答1: you need to insert those uls in another div, to which you'll give width=

How to move all li elements to the left side of the <ul> element?

a 夏天 提交于 2021-02-05 06:49:06
问题 I want to move all li elements to the left side of the ul element. It looks like the first li element has a left margin >0 which I don't understand. Do you know how I can fix this? The ultimate goal is: the first li element #music and #email element in the footer have the same left margin of 70px (same distance from the left border). html, body { margin: 0; text-align: center; } header { overflow: hidden } nav { overflow: hidden; display: inline-block; float: left; margin-left: 70px; } nav li