HTML - A Horizontal List For Links
Hi;
My name is Richard Sher, I'm am very new to coding, this is my first post here. I want to create a single line for the purpose of making a simple navigation bar. First question is do I use HTML text (for the button names) or do I create graphics of the text I want in for example using Photoshop? I was given an example using a list which looks like this: <div id="navcontainer"> <ul id="navlist"> <li id="active"><a href="#" id="current">Item one</a></li> <li><a href="#">Item two</a></li> <li><a href="#">Item three</a></li> <li><a href="#">Item four</a></li> <li><a href="#">Item five</a></li> </ul> </div> CSS #navlist li { display: inline; list-style-type: none; padding-right: 20px; } I would like to hear you comments. Sincerely; Richard Sher . Similar TutorialsHow do I make two links next to each other? Here's the site: http://celticsinsider.webs.com Where it says "Submit An Article", I would like a couple links next to it. Here's my html code and css code: Code: *{ margin:0px; padding:0px; } img{border:0px;} html{ width:100%; height:100%; background-color:#030303; } body{ width:869px; padding:0 65px; margin:0 auto; height:100%; position:relative; } html > body{ height:auto; min-height:100%; } #top{ width:869px; height:70px; background-image:url(images/menu_bg2.gif); background-position:top left; background-repeat:repeat-x; } #menu{ width:869px; height:70px; background-image:url(images/top_bg.gif); background-position:bottom left; background-repeat:no-repeat; } #menu ul{ background-image:url(images/menu_bg.gif); background-position:bottom left; background-repeat:no-repeat; height:42px; width:768px; margin:0 auto; } #menu li{ height:34px; float:left; list-style-type:none; padding:8px 9px 0 13px; } #menu li a{ display:block; height:34px; float:left; } .but1{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but1.jpg); } .but2{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but2.jpg); } .but3{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but3.jpg); } .but4{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but4.jpg); } .but5{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but5.jpg); } .but6{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but6.jpg); } .but7{ background-position:top left; background-repeat:no-repeat; background-image:url(images/but7.jpg); } .but1:hover,.but2:hover,.but3:hover,.but2:hover,.but4:hover,.but5:hover,.but6:hover,.but7:hover{background-position:bottom left} #active{ background-position:bottom left } #header{ width:869px; background-image:url(images/photo.jpg); background-position:top left; background-repeat:no-repeat; } .home{ padding:240px 0 0 0 } .gallery{ width:852px; background-image:url(images/footer_bg.gif); background-position:top left; background-repeat:no-repeat; padding:13px 0 8px 17px; background-color:#0F0F0F; overflow:hidden } .gallery div{ float:left; margin:0 5px 0 0; } .gallery div p{ display:block; background-color:#1F1F1F; border-bottom:1px solid #383838; line-height:16px; text-align:center; width:65px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#5E5E5E } #wrapper{ width:869px; padding:6px 0 90px 0; background-image:url(images/footer_bg.gif); background-position:top left; background-repeat:no-repeat; overflow:hidden; font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#9A9A9A; } .style1{ margin:8px 0 0 0; } #content{ width:869px; background-color:#090909; overflow:hidden; padding:0 0 28px 0; background-image:url(images/wrapper_bg.gif); background-position:bottom left; background-repeat:no-repeat } .title{ padding:11px 0 0 0; height:26px; margin:0 0 8px 0; background-image:url(images/title_bg.gif); background-position:top left; background-repeat:no-repeat; } #left{ width:442px; float:left; padding:0 24px 0 17px } #left div{ padding:15px 0 0 0; width:221px; float:left; } #left p{ width:192px; padding:13px 0 0 0 } .more{ display:block; color:#AE2A00; text-decoration:underline; margin:2px 0 0 0 } .mo visited{text-decoration:underline} .mo hover{text-decoration:none} .block{ width:368px; padding:12px 0 10px 1px; overflow:hidden } .block img{ float:left; border:1px solid #383838; margin:0 11px 0 0 } .block span{ background-color:#000000; line-height:14px; color:#29705B; padding:0 15px 0 5px; margin:2px 0 8px 0; display:block; float:left; } .block p{ float:left; width:200px; } #footer{ width:869px; position:absolute; bottom:0px; height:77px; background-color:#0F0F0F; background-image:url(images/footer_bg.gif); background-position:top left; background-repeat:no-repeat; font-family:Tahoma, sans-serif; color:#9A9A9A; font-size:10px; } #footer ul{ width:768px; height:13px; background-image:url(images/bot_bg.gif); background-position:top left; background-repeat:no-repeat; width:768px; height:13px; margin:20px auto 15px auto; text-align:center } #footer ul li{ display:inline; } #footer ul li a{ color:#9A9A9A; text-decoration:none; margin:0 9px; } #footer ul li a:visited{text-decoration:none} #footer ul li a:hover{text-decoration:underline} #footer p{ width:869px; text-align:center; font-size:11px; } #footer p a{ color:#CE3200; text-decoration:none } #footer p a:visited{text-decoration:none} #footer p a:hover{text-decoration:underline} #about{ width:412px; float:left; padding:0 21px 0 17px; } .pic{ margin:17px 15px 18px 15px; border:1px solid #383838 } #about p{ width:375px; margin:0 0 15px 15px } #history{ width:404px; float:left } #history p{ width:375px; padding:18px 0 0 0 } #nav { font-family: Verdana, Arial, sans-serif; font-size: small;; padding:5px; margin:0px; background-color:#090909; color:#fff; border-bottom: 1px solid #090909; } #nav a { color:#fff; text-decoration:none; } #nav a:hover { text-decoration:underline; } Hi, I'm learning about horizontal lists. I'm trying to position a string ("Stuff" in the code snippet) a given distance (say 100px) to the right of the last item in a horizontal list, on the same line as the list. How do I do this? The following code snippet, using CSS for the UL and LI tags with a WIDTH specification for the UL tag, results in a BREAK between the last list item and the string "Stuff", as shown below: ------------------------------------------------------------------------------------------------------- Books Posters Stuff. ------------------------------------------------------------------------------------------------------- Code Snippet: Code: <HTML> <HEAD> <STYLE> li { float: left; padding-right: 32px; padding-left: 32px; } ul { list-style-type:none; width=300; } </STYLE> </HEAD> <BODY> <UL><LI>Books</LI><LI>Posters</LI></UL> Stuff. </BODY></HTML> In fact the only way to not have a BREAK between the last list item and the string "Stuff" is to remove the WIDTH specificaton from the UL tag altogether, but then the string "Stuff" cannot be positioned a given distance to the right from the last list item--it just goes the default distance. So how can text trailing a horizontal list be positioned a specific distance to the right of the horizontal list on the same line? Thanks very much for any help you can provide. Thanks, Dave hello, what is the easiest way to make url listing,, about 5000 urls to make links in homepage? yes, manual listing is one, <a href="www.example.com">example</a> but.. is there any faster way? url are in urllist.txt and in openoffice database file i have dremweaver,open office I have an unordered list on my page and the links continue after the /a in the webpage. The link can be clicked until the end of the line instead of just the words themselves. Also, with IE7 I noticed that the hover changes all the way until the next list item starts. Here's the link and css info: http://www.yotti.de/englishcourses.html .rccovers { position:absolute; width:650px; margin:0 0 0 150px; text-align:justify; } .rccovers a { color: #666; cursor: pointer; display:block; text-decoration:none; font-weight:700; } .rccovers a:hover { font-size:12px; background:#fff; color:#000; } Thanks for any help you can give. Ok so I have a html list with images on the left of each list item, but I want to have the imagine in-line with each link. Here is what it looks like at the moment: And here is the code: Code: <li> <img src="http://www.aidtheboss.com/images/paper&pencil_48.png" class="left_float" height="20px;" width="20px;" style="padding-right:5px; padding-bottom:7px;"/> <a href="http://www.truefootballmanager.com/2010/03/football-manager-2011.html">Wonderkids List</a> </li> <li> <img src="http://www.aidtheboss.com/images/users_two_48.png" class="left_float" height="20px;" width="20px;" style="padding-right:5px; padding-bottom:7px;" /> <a href="http://www.truefootballmanager.com/2009/11/football-manager-2010-free-players.html">Best Players</a> </li> <li> <img src="http://www.aidtheboss.com/images/folder_add_48.png" class="left_float" height="30px;" width="20px;" style="padding-right:5px; padding-bottom:7px;" /> <a href="http://www.truefootballmanager.com/2009/01/you-play-football-manager-2009-too-much.html">Ultimate FM2011 Downloads</a> </li> <li> <img src="http://www.aidtheboss.com/images/questionmark_48.png" class="left_float" height="20px;" width="20px;" style="padding-right:5px; padding-bottom:7px;" /> <a href="http://www.truefootballmanager.com/2008/10/football-manager-2009-interview-with.html">How to Play FM Online</a> </li> <li> <img src="http://www.aidtheboss.com/images/globe_48.png" class="left_float" height="23px;" width="23px;" style="padding-right:5px; padding-bottom:7px;" /> <a href="http://www.truefootballmanager.com/2009/11/football-manager-2010-kits.html">Football Manager Live</a> </li> Any help on what needs to be added in would be appreciated! Hello, I have absolutely no idea how HTML works, but I have a friend who's making a website, and ideally, we would have a list of websites, and when you click the "random" button, it will randomly go to one of the websites in the list. Is there a simple way of going about doing this? Thanks. Hi, I've got a html/css sIFR menu made as a List. The problem is that in various browsers (FF2, Sfr3, IE5-7) the actual (sIFR) text pixels are in FF and IE unclickable and in all of the browsers the area won't show up Pointer cursor when moving the cursor above a sIFR link. For the latter, I've tried "cursor: pointer" on CSS but I couldn't have yet seen the hoped results. Anyone experienced with sIRF links? How could this be solved up? Thank you. So I'd like to have a 160*600 box with hyperlinks displaying only a headlines I select. I would like the bottom of the box to have arrows for navigating between sections of links that fit in the box with a place to enter a page number in between them. I would like it to begin with displaying the most recently posted links starting on the last page number with that being the first page it displays. I want the bottom of the box to include below the browsing chronological browsing feature an arrow facing left with the word "search" that would open a box with a place to type in text for it to search link headlines. At the bottom of the search box I would like an arrow facing down with the words "search by label". Yes, I would like to not only select a headline for each link but also categorically label them. If I could also select images for it to automatically fill the empty space with when a new page number is started that would be great, even better if it selects ones that fill the most depending on how long the headlines are. If it repeated headlines in extra page space instead of showing images that would be cool too. I'd also like it to automatically expand in height past 160*600 to make a new page number just for a headline that doesn't fit in 160*600. I need this in HTML. My blog is episin.blogspot.com yea, i know it makes me sound like the biggest noob ever but i am so ive put together a few pages with nothing but a list in <ul> tags and i somehow managed to make them horizontal, but now...i want it to be vertical and ive gone over every single line and not been able to work it out so i was hoping maybe you guys could help me out heres the css.... Code: body { background-color: #e3e3db; background-image: url(bg.gif); font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left; margin: 0; padding: 0; } #menu { } #menu li { float: left; height: 28px; margin: 0 5px 0 0; white-space: nowrap; } #menu li strong, #menu li a { float: left; height: 22px; padding: 6px 16px 0 22px; background-repeat: no-repeat; background-image: url(tabs.png); background-position: -10px -28px; color: #FFFFFF; font-weight: normal; text-decoration: none; /* hide overflowing text */ max-width: 290px; overflow: hidden; text-overflow: ellipsis; } #menu li span { float: left; height: 28px; width: 6px; background-repeat: no-repeat; background-image: url(tabs.png); background-position: -4px -28px; } #menu li.selected strong, #menu li.selected a { background-position: -10px 0; color: #000000; font-weight: bold; } #menu li.selected span { background-position: -4px 0; } #menu li:hover strong, #menu li:hover a { background-position: -10px -56px; } #menu li:hover span { background-position: -4px -56px; } #menu li.selected:hover strong, #menu li.selected:hover a { background-position: -10px 0; } #menu li.selected:hover span { background-position: -4px 0; } -thanks in advance Hi everyone, I hope I have posted this in the right area. This is my first time posting here. I currently have my main pages listed at the top of my site as graphics (see fussybaby.ca). I would like to potentially remove these graphics and use text links instead - I had the graphics designed for me, so I can't just go in and make new ones, however I'd like to change/rearrange the links and add some new ones. So my question is: How hard is this to do? Is this something I need to hire someone to do for me? Thanks in advance for any advice! I have a big list and I want to show on my webpage 6lines from that list randomly (when webpage is refreshed another 6 lines appear). can anyone help me with he code, how should the list look like so it works...or where can I find more info on this ? thanks I am making a website with a list inside list for my navigation bar. It looks good on safari(win/mac) and firefox but the list looks horrible in IE7.0(didnt check 6.0) I was wondering if anyone know what it could be HTML Code: Code: <div id="nav"> <img class="menupic" src="images/mainmenu.png" alt="Main Menu"/> <ul class="navli"> <li><a class="point" href="#"><img src="images/menu_findme.png" alt="findMe"/></a></li> <li> <ul class="navlinks"> <li><a href="#goto_facebook" id="facebook">- Facebook</a></li> <li><a href="#goto_myspace" id="myspace">- Myspace</a></li> <li><a href="#goto_youtube" id="youtube">- Youtube</a></li> </ul> </li> </ul> <ul class="navli"> <li><a class="point" href="#"><img src="images/menu_blog.png" alt="blog"/></a></li> <li> <ul class="navlinks"> <li><a href="#blogid2" id="blogid2">- Testing | May 01</a></li> <li><a href="#blogid1" id="blogid1">- Debut Album | Apr 30</a></li> <li><a href="#goto_blogarchive" id="blogarchive">- Archives</a></li> <li class="donthidethis"><ul class="navli donthidethiseither" style="padding:0;"> <li><a class="point" href="#">- Categories</a></li> <li><ul class="navlinks"> <li><a href="#goto_catid2" id="catid2">- Media</a></li><li><a href="#goto_catid1" id="catid1">- News</a></li><li><a href="#goto_catid3" id="catid3">- Off Topic</a></li><li><a href="#goto_catid4" id="catid4">- Tutorials</a></li> </ul></li> </ul></li> </ul></li> </ul> <ul class="navli"><li><a class="point" href="#"><img src="images/menu_eliasmusictv.png" alt="eliasMusic Tv"/></a></li> <li><ul class="navlinks"> <li><a href="#" id="coming">- Coming soon...</a></li> </ul></li> </ul> <ul class="navli"><li><a class="point" href="#"><img src="images/menu_about.png" alt="about"/></a></li> <li><ul class="navlinks"> <li><a href="#goto_biography" id="biography">- biography</a></li> </ul></li> </ul> <ul class="navli"><li><a class="point" href="#"><img src="images/menu_links.png" alt="links"/></a></li> <li><ul class="navlinks"> <li><a href="#" id="links">- Coming soon...</a></li> </ul></li> </ul> <ul class="navli"><li><a class="point" href="#"><img src="images/menu_contact.png" alt="contact"/></a></li> <li><ul class="navlinks"> <li><a href="#goto_contact" id="contactpage">contactForm</a></li> </ul></li> </ul> CSS Code: Code: #nav { float:right; width:195px; padding-left:20px; background:url("images/navback.png"); } #nav ul { list-style: none; margin-left:1px; border: none; } #nav .navli { padding-top:3px; padding-bottom:3px; } #nav .navlinks { padding-left:25px; } #nav .navlinks a,a:link { color:#262626; } #nav .navli img { margin-top:5px; margin-bottom:5px; } #nav .navlinks a:hover { color:#dadada; } #nav img.menupic { margin:20px 10px 5px 95px; } #nav a { font-size:14px; display:block; } #nav a.point { font-size:14px; font-weight:bold; } .navliover { background:url("images/navhover.jpg"); } Any help at all would be appriciated please I can show u the website via Private message if you are interested in helping Thanks in advance Reply With Quote I'm new to HTML/XHTML, so thanks for helping me understand the spacing rules that are applying he HTML: Quote: <div id="nav"> <ul> <li><a href="index.html">Main</a></li> <li><a href="resume.html">Resume</a></li> <li><a href="portfolio.html">Portfolio</a></li> <li><a href="contact.html">Contact and Networking</a></li> </ul> </div> CSS: Quote: #nav { height: 37px; text-align: center; background-color: #858585; } #nav ul { margin: 0; } #nav li { display: inline; } #nav a { padding: 9px 12px 9px 12px; line-height: 38px; border-left: 1px solid black; } Between every link in my horizontal navigation menu, there is a space (which I don't want). In order to get rid of this space, I have to change my HTML code to... Quote: <div id="nav"> <ul> <li><a href="index.html">Main</a></li><li><a href="resume.html">Resume</a></li><li><a href="portfolio.html">Portfolio</a></li><li><a href="contact.html">Contact and Networking</a></li> </ul> </div> ...which in turn sacrifices readability. This all seems very counter-intuitive to me, since I was under the impression that I could format my code readably without having to worry about its presentation. I can only guess that my line breaks (textual line breaks, not actual <br /> tags) are being interpreted as white space within my <ul>. If this is the case, my only other option would be to display my <li>s as block elements with zero margins, float them, and then use margins to push them to the middle (which is all WAY uglier than being able to center them with text-align). This is how I understand what's going on. If I am correct, does this mean I'm forced to sacrifice readability for functionality? I dont know how to explain it better but how do i do this http://www.target.com/Movies-MMB/b/r...ode=1259488011 so at the bottom of my page i can add 4 to 5 different products and allow for those left and right buttons show more... any direction would help thanks With the "horizontal rule", is it possible to write over it? The reason I am asking is because I saw an example of a horizontal rule, and it reminded me of a footer. Are they used for footers if some cases? Cheers guys (and I apoligize for all the questions). I want to create a website that both Firefox and IE will recognize my code where there is no vertical scroll. The page only scrolls horizontally. The site I am creating is for a portfolio and horizontal scroll is best for vieiwing such. Do I need to use CSS to make this work or how can I acheive this? Thank you Chaser Hi, How can I create a row of images with a horizontal scrollbar? I'd be really grateful to your help! Regards Rain Lover Im working in a HTML page using also JSP (Java). In the HTML code I have a large string of information (horizontal string) that does not fit in the screen. I also would like to have this info aligned in colums. I am using <TABLE>. The problem with <TABLE> is that it put all the information in one screen, breaking the string in two parts, instead of having an horizontal scroll bar and using this scroll bar to see al the info. Thanks, John Morales I am wanting to do a horizontal scrollbar like this http://felicefawn.com/fashion.htm with pictures inside. The pictures won't stay side by side, they go underneath therefore creating a vertical scrollbar. Anyone know how to do this? Help much appreciated!! hi all, im having a bit of a problem displaying a list horizontally, and its really getting a bit frustrating. as far as i can see, it should be a case of using display:inline on the li tags, but so far no luck. ive included my css below: Code: #navigation ul { list-style-type:none; padding:0px; margin:0px; } #navigation ul li { display:inline; } #navigation ul li a { display:block; width:90px; height:30px; color:#fff; text-align:center; text-decoration:none; } #navigation ul li a:hover { background-color:#EF4252; } and my html: Code: <td id="navigation"> <ul > <li> <a href="contact.html" >Contact Us</a> </li> <li> <a href="wwd.html" >What We Do</a> </li> </ul> </td> any help would be appreciated. thanks |