HTML - Randomise A List?
Hi there,
I was just wondering, if I have a list, is there a way that on reload the list ramdonises, jumbles up, so all the enteries are in a different order? Also, just to make it a little more complicated is there a way to have two columns in a table and on reload they randomise, however each row stays with its "partner" ? Thanks in advance, Josh Similar TutorialsIs there a code that randomly shows one of e.g. three pictures that changes everytime you refresh the page? And/Or, something that changes the image fading from one into the other on a continuous loop. Thanks. 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 Hello, I ran into this problem today in my Basic XHTML class, and it was enough to stump me and the instructor: if you want to put an unordered list in the middle of a page, but you want the list items to be left-aligned so the bullets are one on top of the other...how do you do it? I started with code something like <div align="center"> <ul type="disc"> <li>Wine</li> <li>Women</li> <li>Song</li> </ul> </div> This centers the list on the page, but it also centers each list item. I tried placing a <div align="left"> around the list items, individually and collectively, but depending on the positioning it either had no effect or it nullified the center attribute completely and gave me a left-aligned list on the left edge of the page. Attempts to change the style of the <li> tag, which I haven't done in months and was never all that good at, failed. I know I can do this in ten seconds by putting the list inside a one-cell table, and with much fiddling I could probably do it with a spacer GIF...but what's the 1.0 Strict way? hi, I need to display all the names in the list box. So using select tag i have done this. When the data exceeds the scroll bar will be displayed. But the scrollbar stands in top and shows the top data. Instead i need to display the bottom data that is the scroll bar should be always down and when the user needs the top then they can scroll and see it. Can you please give me suggestions to be done like this. regards thiru List boxes and Text boxes I have a list of music (about 400 items) and I want to put the text in a div the best way. I heard from somebody else that I should put it in a javascript file and link to that to keep my html clean of 400 extra lines. Is that a good idea and how would I go about doing that? If I just do put it in a body tag, is there an easier way of making each item on a separate line like it looks like in a text document? As of now, everything just runs together because there are no <br> tags and it would take forever to do each individual one. Is there an easier way? Thanks. I've made a selectable list with numeric values and I want to pass the values to a text box below the lists to count a total... i.e. calorie counter... any ideas how to do this? here is a sample of my code: Code: <select title="Meats"> <option value="100">Chicken Breast: = 100</option> <option value="137">Ground Beef: 95% lean = 137</option> <option value="142">Steak: (round/sirloin tip) = 142</option> <option value="84">Crab: = 84</option> <option value="110">Halibut: = 110</option> <option value="110">Cod = 110</option> <option value="91">Flounder: 91</option> <option value="96">Tilapia: 96</option> <option value="90">Lobster: = 90</option> <option value="106">Shrimp: = 106</option> <option value="112">Veal: = 112</option> </select> I operate a game Server that i wish for a list of "Currently Online Players" list to be displayed on my website for the server. I have a mod that allows anyone to check the online players by entering the address "http://mine-craft.kicks-ass.net:6561/serverinfos/players-online" When entering that address it displays a blank page with a list of players online in-game. Would there be a possible way to have my website fetch this information from that URL and list it on the website? On my website www.fresh-lobster.co.uk my footer displays 3 lists with various links, in a horizontal line (ul is floated left in the css). But the way i created the list headers was to put a the list header within an LI so it would format (margin etc) with the rest of the list. ul li --list header-- /li li --list item -- /li li --list item -- /li /ul But when viewing in non-css mode, it displays a disc like any other element in an LI. I tried using the LH (which is included in html3)... ul lh --list header-- /lh li --list item -- /li li --list item -- /li /ul But IE doesnt like it (even though Opera does). Is the LH element still functioning? or is there some other way of doing it. Thanks Hi , I have an odd HTML question. In my company we make procedures (stuff that we think we need written down in case we need to repeat it), which we update on a regular basis. Whenever we go to do an install, update, fix, etc. and we need a procedure, we print it out and then head off with it (we make red lines as necessary.) All of these are in HTML and stored in CVS. One of the engineers (she is not terribly familiar with HTML and turned to me) asked me if I could make a little "box" to the left of a list. The steps of the procedure are a bunch of <li> tags, having a nice box to the left to check it off as you go through them would be great. This stumped me. The best that I could do was make a one-celled table inside the <li> tags (the HTML for which I've posted) in order to get the impression of a "box" where you can check off a step that you just completed. Is there any way to put that box on the left? If you look at the end of this post I made a simple ASCII representation of what I would like to accomplish. Code: <html> <head> <title> Example </title> </head> <body> <ol> <li> <table border="1"> <tr> <td> </td> </tr> </table> Do stuff... </li> <li> <table border="1"> <tr> <td> </td> </tr> </table> Do stuff... <ol type="a"> <li> <table border="1"> <tr> <td> </td> </tr> </table> Do sub-step... </li> <li> <table border="1"> <tr> <td> </td> </tr> </table> Do sub-step... </li> <li> <table border="1"> <tr> <td> </td> </tr> </table> Do sub-step... </li> </ol> </li> <li> <table border="1"> <tr> <td> </td> </tr> </table> Do stuff... </li> </ol> </body> </html> Code: +---+ | | 1) Do stuff... +---+ +---+ | | 2) Do stuff... +---+ +---+ | | a) Sub-step... +---+ +---+ | | b) Sub-step... +---+ +---+ | | c) Sub-setp... +---+ +---+ | | 3) Do stuff... +---+ Hi, I need to have a form on my website that enables users to put their email address in a box and for it to be sent to my email account to add to a mailing list. Thanks for any help Dyfrig Hi I need to design a list with yearnumbers like this: 1980 Born in LA 1986 School in NY with hollydays 1998 University in London . . .and so on. the following approach has unfortunately a dot after the number: <ol> <li value="2009">Dotzigen, Svizzera, nel ambito del Summerdays 09</li> <li value=""></li> <li value=""></li> <li value=""></li> <li value=""></li> <li value=""></li> PLEASE HELP! I'm working on a project and I want to add the following code to my page, but it's not working out. My table may be a mess. <h2>Fresh Fruits</h2> <ul> <li>Strawberries</li> <li>Kiwi</li> <li>Pineapple</li> <li>Apples</li> <li>Bananas</li> </ul> <h2>Dipped Items</h2> <ul> <li>Oreos</li> <li>Marshmallows</li> <li>Pretzels</li> <li>Gummie Treats</li> </ol> This is my page code. Would someone show me where to place the above list 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Custom Chocolate Menu</title> </head> <body> <map name="Map" id="Map"><area shape="rect" coords="449,6,528,96" href="menu.htm" /> <area shape="rect" coords="549,5,633,96" href="contactform.htm" alt="Contact Us" /> </map> <table width="700" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <th colspan="2" bgcolor="#FCE9C4" scope="col"><img src="images/header.gif" alt="Custom Chocolates" width="650" height="100" border="0" usemap="#Map" /></th> </tr> <tr> <th width="375" valign="top" bgcolor="#FCE9C4"> </th> <th width="375" height="650" align="center" valign="top" bgcolor="#FCE9C4" scope="row"><p><img src="images/choc2.jpg" width="200" height="267" /></p> <p><img src="Images/choc15.jpg" alt="Chocolate Apple" width="200" height="260" /></p></th> </tr> </tr> </table> </body> </html> Thank you in advance, Karen I'm having a very odd problem with unordered lists. I have made them before like this and they have worked just fine, its odd that now its not working on any browsers. Did HTML standards change lately? Code: <ul style=" list-style-type:circle"> <li><a href="#sitespecs">Site Specs</a></li> <li><a href="#sitehistory">Site History</a></li> </ul> http://www.animeffz.com/codegeass/siteinfo.php Thats all the code i have involved with it =/ but nuttin is showing up. Not a single mention of them in my CSS also. How can I make a list in HTML like so... Name: Charles Steve Mike James James Johnson Marcus Willis All the names should be aligned straight down aligned properly with the first name "Charles" for some reason this forumn does not show post the way i wrote it Hi all, I have one listbox( in form ) with multiple selection option. upon clicking submit button this form will send details to servlet program. The problem here for me is , whichever is selected in listbox, that only am getting in servlet side. Is it possible to get all the values from list box even without single selection. can any one help me ? I see the use of the <ul> and <li> tags when creating things like menus and in the case of digg and gamegrep at the least, comments. I can see a possible use with comments for indentatiing replies to other comments. The question still stands for things like menus though, does it have to do with search engine crawlers and how they parse the page? Any insight by anyone who knows anything about this would be nice. Thanks I've created a drop down list with 4000 options on it which I did from an example I found on line. This is fine - loads quite quickly! I then had to add another 9 fields with the same 4000 options on and now the page doesn't load as quicky as I'd like. I was wondering if there was a way of defining the list of 4000 options once and then asking the ten drop down lists to reference it? |