html-lists

Float unordered lists (UL) next to one another, and stack them at the bottom of each other, with no margins or spaces

。_饼干妹妹 提交于 2019-12-18 18:26:13
问题 I have multiple unordered lists (UL) elements. Please check the image below: what I want to do is float the ULs next to each other. The ULs have different lenghts of content (LIs), therefore some UL are longer than other. When I float ULs next to each other in a limited width div layer, at some point the last ULs float at the bottom / left. However... if there's a UL that is longer there will be some space. I wish the ULs to float left and to stack to each other, at the bottom of each UL

Left align both list numbers and text

守給你的承諾、 提交于 2019-12-18 15:50:05
问题 I'd like to left align both the numbers and the text in my <ol> . This is what I'm trying to accomplish: For now, each <li> contains an <a> , but that can change. So far I tried putting left padding and then a text-indent on the <a> . Here is my code as of now. HTML: <ol class="dinosaurs"> <li><a>Dinosaur</a></li> <li><a>Tyrannosaurus</a></li> <li><a>Camptosaurus</a></li> </ol> CSS: .dinosaurs{ list-style-position: inside; } NOTE: I'm viewing the webpage in Chrome 23 on Windows 7. 回答1: You

CSS causing an UL to be indented too much in IE

人走茶凉 提交于 2019-12-18 15:01:04
问题 I have a navigation bar at the top of a page. In FF and Chrome the navigation bar displays fine. However in IE8 (with or without compatibility) the UL seems to indent from the left hand side, not each li just the whole li; despite declaring text-align:center; width:600px; margin:auto; padding-left:0; Any ideas what could be causing this? 回答1: margin-left:0px; In Firefox the UL is padded left by default, in IE it has a left margin. Example: <html> <head> <style> ul{ border:1px solid red;

CSS overflow:hidden hiding a list's bullets?

霸气de小男生 提交于 2019-12-18 12:47:31
问题 I've just noticed something funny. Let's say I have a HTML list: <ol> <li>Lorem</li> <li>ipsum</li> <li>dolor</li> <li>sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies. Curabitur et ligula.</li> </ol> And this CSS: li { white-space: nowrap; overflow: hidden; } The long text in the last item is indeed hacked off when it goes off the container's width, as expected. BUT! The list item numbers are affected by

How to create a hyperlink that directs to a page with pre-selected option in a drop-down menu?

你。 提交于 2019-12-18 09:00:22
问题 I want to clarify, I am not looking for a way to create hyperlinks within options in a drop-down menu. I am looking for a way to hyperlink to one of those options in a drop-down menu from an external page. Take for instance the following scenario, there's page A and on page B there's a drop-down menu with X options. Page A provides a link to page B but once you click and land on page B, an option is pre-defined selected. It is basically an anchor link but I want it to use as an external link.

CSS: anchor will NOT accept height

丶灬走出姿态 提交于 2019-12-18 07:52:28
问题 I have been pulling my hair our for over an hour on this and I just can't understand why it's not working. HTML: <div id="mainmenu"> <div class="menu"> <ul> <li class="page_item page-item-6"><a href="http://localhost/mysite/blog/">Blog</a></li> <li class="page_item page-item-4 current_page_item"><a href="http://localhost/mysite/">Front Page</a></li> <li class="page_item page-item-2"><a href="http://localhost/mysite/sample-page/">Sample Page</a></li> </ul> </div> </div> CSS: div#mainmenu {

CSS: anchor will NOT accept height

荒凉一梦 提交于 2019-12-18 07:52:07
问题 I have been pulling my hair our for over an hour on this and I just can't understand why it's not working. HTML: <div id="mainmenu"> <div class="menu"> <ul> <li class="page_item page-item-6"><a href="http://localhost/mysite/blog/">Blog</a></li> <li class="page_item page-item-4 current_page_item"><a href="http://localhost/mysite/">Front Page</a></li> <li class="page_item page-item-2"><a href="http://localhost/mysite/sample-page/">Sample Page</a></li> </ul> </div> </div> CSS: div#mainmenu {

Help with PHP recursive navigation list menu

允我心安 提交于 2019-12-18 04:23:23
问题 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

ListItem disc displaying at vertical bottom

只谈情不闲聊 提交于 2019-12-18 03:58:12
问题 I have a couple un-ordered lists on my page. Both lists use list-style: disc inside; . Each list's list-items have a couple div 's inside them. The problem is that the list-item's content takes up multiple lines and the disc is appearing vertically, at the bottom of the multi-line list-item. Here is a screenshot kind of showing the problem I am experiencing. Note that I stole the image from a similar question, it is not my HTML or CSS. Here is a striped down version of my HTML: <html> <head>

How can I disable a specific LI element inside a UL? [closed]

。_饼干妹妹 提交于 2019-12-17 23:44:38
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . I have a menu which is a <ul> . Each menu item is a <li> and currently clickable. Based on some conditions, I want to disable (make it not clickable) a particular <li> element. How can I achieve this? I tried using the disabled attribute on the <li> and list-style:none as well. Neither worked. Any