CSS - List Navigation <a> Displaying Below Bullet ...
Hi
I've been trying make an <a> anchor nested within a <li> list tag appear on the same row as the bullet, with no avail. It's hard for me to explain exactly, so I've uploaded two images: This is how I'd like the list items to appear, substract the extra list item which I have no idea why it appears the Image 1 This is how the list items appear: Image 2 Here's the HTML: Code: <div id="primary-sidebar"> <div class="shadow"> <div class="tlc"></div> <div class="trc"></div> <h2 class="box-title"> Games list </h2> <div class="box-content-lhz"> <ul id="games-list"> <li> <a href="/intersection.html?anarchy_online">Anarachy Onlins</a> </li> <li> <a href="/intersection.html?Aion">Aion</a> </li> <li> <a href="/intersection.html">Aries Online</a> </li> <li> <a href="/intersection.html">Cabal Online</a> </li> <li> <a href="/intersection.html">Eve Online</a> </li> <li> <a href="/intersection.html">Guild Wars</a> </li> <li> <a href="/intersection.html">Harrier</a> </li> <li> <a href="/intersection.html">Jaxsos' world</a> </li> <li> <a href="/intersection.html">Kal Online</a> </li> <li> <a href="/intersection.html">Lemmings</a> </li> <li> <a href="/intersection.html">Leiviathan Online</a> </li> <li> <a href="/intersection.html">Party Online</a> </li> <li> <a href="/intersection.html">World of Warcraft (US)</a> </li> <li> <a href="/intersection.html">World of Warcraft (EU)</a> </li> </ul> </div> <div class="blc"></div> <div class="brc"></div> </div> </div> Here's the CSS Code: ul { padding-left: 2em; list-style: square; } #games-list { list-style-image: url("/_images/bullet1.gif"); list-style-position: inside; margin: 0px; padding: 0px; } #games-list li { } #games-list a{ font-weight: bold; font-family: verdana, Arial, Helvetica, sans-serif; font-size: .9em; color: #424547; text-decoration: none; display: block; background: url(/_images/sprite-list.png) top left no-repeat; padding: 5px; padding-left: 20px; } #games-list a:hover{ background-position: left -40px; color: #00a2ff; } I'd appreciate anyway help at all, as this has been on my mind for a while. Similar TutorialsMy page http://www.doylecompanylaw.com/doyle.html uses images for the bullets along the left navigation bar. They display perfectly in Opera and Firefox but position themselves too far up in IE. Anyone got any ideas on how to fix this problem? Thanks in advance. Can a bulleted list be split in to two collumns? and if so how? I've tried wrapping the list in <div>'s and trying to force it with margins and widths but can't get the result. For example: Code: <ul><li>stuff1</li><li>stuff2</li><li>stuff</li><li>stuff3</li><li>stuff4</li><li>stuff5</li></ul> stuff1 stuff2 stuff3 stuff4 stuff5 I've had a good look around for a solution and I've tried applying them to no avail. I can't get the bullet lists to show in ie7 in the block on the right (they show fine in the content (on CV page) : 92 dot 48 dot 108 dot 113 /~legal Any ideas? Also, any quick design hints to improve the site? Hi everyone, Just two really quick questions. Is there a way to get the list-style-image property to work for in-line unordered lists? And is there a way to remove the first bullet in the list? Thanks for any help. ok i have a list that has style:none. this list is a link.. now whenever a user wants to hover over it i want to add a pointer (arrow perhaps) on the left of the list... Code: #menu li { list-style:none; } #menu a, #menu a:visited { text-decoration:none; color:#0033FF; } #menu li a:hover { list-style-image:url(images/pointer.jpg); } #menu a:hover { background-color:#0033FF; color:white; font-weight:bold; } now html Code: <ul> <li><a href="home.php">Home</a></li> </ul> Hi All, I am building a site that has the following structure for the navigation; Code: <div id="navigation"> <ul id="navlist"> <li class="home"><a href="../index.asp" title="home"><span>home</span></a></li> <li class="aboutus"><a href="../aboutus.htm" title="aboout us"><span>about us</span></a></li> <li class="ourservices"><a href="../ourservices.htm" title="our services"><span>our services</span></a> <ul> <li class="internationalmail"><a href="ourservices_internationalmail.htm" title="international mail"><span>international mail</span></a></li> <li class="worldwidecourier"><a href="ourservices_worldwidecourier.htm" title="worldwide courier"><span>worldwide courier</span></a></li> <li class="worldwidefreight"><a href="ourservices_worldwidefreight.htm" title="worldwide freight"><span>worldwide freight</span></a></li> <li class="storage"><a href="ourservices_storage.htm" title="storage"><span>storage</span></a></li> <li class="publishingservices"><a href="ourservices_publishingservices.htm" title="publishing services"><span>publishing services</span></a></li> </ul> </li> <li class="requestquote"><a href="../requestquote.htm" title="request a quote"><span>request a quote</span></a></li> <li class="contactus"><a href="../contactus.htm" title="contact us"><span>contact us</span></a></li> </ul> </div> The main LI is horizontal, and the containing UL, LI is a vertical dropdown. The seperate CSS file does the image replacements on the <a> and hides the text within the <span>, usual stuff. The nav works great, with the graphic rollovers etc. The rollover, again, standard way of doing it, background: url(<FILE>) no-repeat top left; and the a:hover rollover is a background: bottom left;. Edit: Just noticed that I can't link to the full site that I have uploaded for preview. What I want to do, is when the user roll's over any of the items within the sub-navigation, it keeps the main Services navigation link rolled over also. The only way I could think of doing this, and relatively simply, would be to use JavaScript, but wanted to explore any other CSS ways of doing this. For example, is it possible to change a style of another class, from another? Your help would be much appreciated! Hi all, Probably easy, but I'm stumped... At this test page, I have now included a little horizontal image spacer image IN the list on the right. You'll notice that it has a bullet just like the text links do. I want the image right where it, preferably with no space above or below it between the "Resume" & "I Can Help" links. If I close the UL tag after Resume, then re-open it before I Can Help, the gap is too big. So I threw the image directly into the list! But I gotta kill the bullet. How? CSS FILE. Thanks! Chris when using unordered lists, is there any way to get more than 3 different bullet designs as you go into deeper nests? after the 3rd nest, the same bullet design is used over and over again. Hello, I've created a menu by using an unordered list. Some of the list's items have submenus which is done with another unordered list nested inside the first. So my menu/list would look something like this: ( XX = the bullet image ) Code: XX Item 1 XX Item 2 XX Item 3 XX Item 3-1 XX Item 3-2 XX Item 4 I was wondering if it is possible to use a different bullet image for the nested/indented unordered list? So the menu/list would now look like: ( XX and ZZ = the bullet images ) Code: XX Item 1 XX Item 2 XX Item 3 ZZ Item 3-1 ZZ Item 3-2 XX Item 4 My existing code is: Code: <ul> <li><a href="#">Item 1</a></li> <li><a href="#">Item 2</a></li> <li>Item 3 <ul> <li><a href="#">Item 3-1</a></li> <li><a href="#">Item 3-2</a></li> </ul> </li> <li><a href="#">Item 4</a></li> </ul> And my existing ul CSS is: Code: ul { list-style-position: outside; list-style-type: square; margin-left: 18px; margin-bottom: 0px; padding: 0px; list-style-image: url(/graphics/layout_05/list_bullet.gif); margin-top: 0px; margin-right: 0px; } Thank you for any and all help! Is there a way to decrease a default spacing between bullet and text in <ul>? Trying to follow "the best practices" I wanted to convert my menu from bunch of <a></a><br> to unordered list. I already display arrows icon next to menu items so I though it would save me some typing on <img>. But there is one problem: I can't decrease the space between bullet and text. There is bullet, around one em of empty space and then text. It breaks my layout, making menu items wrap to another line, and also wastes some space. I tried to play with margins and padding, but bullets still stay at the same place. Also negative margin and padding doesn't seem to work. If I use a background image instead of bullet, I can adjust the spacing but then the bullet position doesn't seem consistent and get cramped on text in longer lines. I've used bullet image for a list but it give more indent then i want to use. I've checked the padding and marging for the other DIV ID's and set all to zero but also there is more indent in the left side. How is it possible to reduce the left indent for the list? Code: .test1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; height: 15px; color: #003366; text-align: left; list-style-image: url(bullet1.gif); border: 1px solid #000099; list-style-position: outside; width: 150px; margin: 0px; padding-top: 5px; padding-bottom: 5px; } #test2{ width:215px; background-image: url(1bg-menu-v-mid.gif); background-repeat: repeat-y; border: thin solid #000066; float: left; } Helllo all: I am having difficulty getting a navigation list to display as separate boxes. I get one large box with all the clickable links therein. I want one box with each link place on it. Here is my HTML code for the list: <ul id="nav"> <li><a href="hey therel">flight1</a></li> <li><a href=" Eaglesoft">Eaglesoft</a></li> <li><a href="state police"">State Police</a></li> </ul> Here is the associated style rule:#nav{font-family:arial;border-styleutset; padding:10px;list-style-type:none; color:#000066;position:absolute;top:2.5in;left:9in; background-color:#ffff00;width:2.7in;text-align:center;display:block;} Can anyone tell me why this list is being parked in one box rather that three separate boxes. The name of my text editor is CoffeeCup. Please understand that I realize that the above html coding does not creat a link..this forum blocked my links..thanks I am going to heck right now trying to get this navigation to work. Here is what it is A horizontal list based navigation that has a unique background for each of the 6 choices. It will also have a rollover effect on the background and the text when the user is on that item. The links will be text but the background will be an image. How do I set each item's background to the correct width and height pixel wise? I'm making a horizontal navigation menu using lists and CSS. It looks fine in IE, but in Mozilla, the double border on the bottom appears just beneath the top one, and the next line shows up after the unordered list. Hard to explain - you'd basically have to check it out for yourself: http://www.michaelaparicio.com/ Any help would be greatly appreciated! Thanks. Regards, Mike Aparicio Hi All, I have a new site and it has a bug that I don't know how to fix. The navigation and sub navigation is done with a list that is styled with CSS to be horizontal. I am not an expert at this, but learned it from a site, but unfortunately can't remember where The thing is, the site works most of the time. But when pages load slow, sometimes the list gets displayed as a normal vertical list and the entire "look" of the navigation is ruined. I'm sure I've done something wrong, but I don't know what. Are there any CSS experts here who can set me straight? The site is http://www.thehousebreakingbible.com/training/index.htm Thanks for your time, Dana Here is a quick visual layout of my page (container) (div banner) (div left column) (div middle content) (div right column) (div footer) In my (div left column) is a list that is aligned right which works great. However, lower in the (div left column) I wish to make another list and align it left. The problem is it won't align all the way to the left. It stops at about the center of the div. I didn't notice it on the first list because it aligned right just fine but it also stops in the middle. Here is the HTML: (go easy on the coding, I'm still pretty new at this stuff) Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" /> <title>Las Vegas Floor Care</title> </head> <body id="body"> <div id="container"> <div id="banner"> </div> <div id="content"> <div id="content_left"> <div class="links"> <ul class="list"> <li><a href="index.htm"><span class="list_big">H</span>OME <span class="list_big">P</span>AGE</a></li> <li><span class="list_big">R</span>ESIDENTIAL</li> <li><span class="list_big">C</span>OMMERCIAL</li> <li><span class="list_big">C</span>ONTACT <span class="list_big">U</span>S</li> </ul> </div> <div class="special_offers">Special Internet Offers</div> <img class="image_center" src="images/coupon.jpg" /> <ul class="list_offers"> <li>Test 1</li> <li>Test 2</li> </ul> </div> <div id="content_middle"> <div id="content_middle_top"> </div> <p class="text"><img src="images/slogan.jpg" style="float:left; margin-right:2px" /> At Las Vegas Floor Care we use Prochem truck mount extractors, which have been rated number one for over 30 years. We also use the Bridgpoint brand of treatment solutions that are eco friendly, pet friendly, and are even biodegradable. We offer carpet repair, cleaning, and protection making you get more out of your carpet no matter what the situation. We also offer 3 different types of tile cleaning to fit the condition of your tile and your pocket book.</p> <br /> <p class="text">We cater to all aspects of cleaning ranging from the average home owner who wants clean floors to the executive who needs to keep their office in tip top shape, and everything in between. There is no job too big or small. We offer several service packages for home owners with yearly service contracts.</p> <div id="content_middle_bottom"> </div> </div> <div id="content_right"> <img class="image_center" src="images/contact.jpg" /> <div class="side_text">If you have questions or would like to schedule a cleaning, please contact us at <span class="contact_number">(702) 756-0148</span>.</div> </div> </div> <div id="bottom"> <img src="images/bottom_top.jpg" align="top"/> <p class="bottom_text"> Phone: (702) 756-0148 <br /> Fax: (206) 350-7320 <br /> </p> </div> </div> </body> </html> Here is the CSS: Code: #banner {position:relative; width:700px; height:130px; clear:both; background-image:url(../images/banner.jpg)} #body {text-align:center; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; background-image:url(../images/bg.jpg); margin-top:20px; background-position:center} #bottom {position:relative; text-align:right; width:700px; clear:both; background-color:#970000} .bottom_text {font-family:Calibri; font-size:14px; text-align:right; margin:0px 8px 0px 4px; color:#CCCCCC} .contact_number {font-family:Calibri; font-size:12px; color:#970000} #container {width:700px; margin-left:auto; margin-right:auto; text-align:left} #content {position:relative; width:700px; overflow:auto; background-image:url(../images/content_bg.jpg); background-position:center} #content_left {float:left; width:138px; margin-right:5px; clear:left} #content_left_bottom {width:138px; background-color:#FF3399} #content_left_top {width:138px; background-color:#FF3399} #content_middle {float:left; width:414px} #content_middle_bottom {width:414px; height:100px; background-image:url(../images/middle_bottom.jpg)} #content_middle_top {width:414px; height:30px; background-image:url(../images/middle_top.jpg)} #content_right {float:left; width:138px; margin-left:5px; clear:right} #content_right_bottom {width:138px; background-color:#00FF00} #content_right_top {width:138px; background-color:#00FF00} .image_center {margin-left:auto; margin-right:auto; text-align:center; display:block} .links a:link {text-decoration:none; color:#666666} .links a:visited {text-decoration:none; color:#666666} .links a:hover {text-decoration:underline; color:#970000} .links a:active {text-decoration:none; color:#970000} .list {font-family:Calibri; font-size:14px; list-style:none; text-align:right; margin:0px 4px 20px 4px; border-bottom:solid; border-bottom-width:1px; border-bottom-color:#666666; padding-bottom:10px; padding-right:4px; color:#666666} .list_big {font-family:Calibri; font-size:18px} .list_offers {font-family:Calibri; font-size:12px; list-style:none; text-align:left; margin-left:0px; overflow:auto; color:#666666} .side_text {font-family:Calibri; font-size:12px; text-align:justify; margin:0px 4px 0px 4px; color:#666666} .special_offers {font-family:Calibri; font-size:18px; text-align:center; margin-left:4px; color:#970000} .text {font-family:Calibri; font-size:14px; text-align:justify; margin:0px 4px 0px 4px; color:#666666} Thanks ahead of time for any help. Hi, I'm using a right-to-left layout and I can't find a way to display my list items correctly on Firefox. When I insert something into the rtl div with a float, the list item does not wrap correctly. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style type="text/css"> <!-- #content { margin:0 200px 0 20px; border: 2px solid #000; direction:rtl; } #floatdiv { width:100px; height:100px; margin:10px; border: 1px solid #000; float:left; } --> </style> </head> <body> <div id="content"> <div id="floatdiv"</div> <p>This is a test</p> <ul> <li>item 1</li> <li>item 2</li> </ul> </div> </body> </html> Is there a problem in my code? Thanks, Ehud. I'm having an issue with a bullet, on www.wirelessguy.net The last bullet isn't showing for some reason. Here is my HTML and CSS. When I take the class off of the HTML the bullets show up fine. Code: <ul class="phoneOneSpecs"> <li>Color Display</li> <li>External Caller ID</li> <li>Voice Activation</li> <li>Wireless Internet Access(WAP)</li> </ul> Code: .phoneOneSpecs, .phoneTwoSpecs, { position: absolute; top: 5%; right: 8%; font-size: 12px; list-style-type: circle; } |