Kokisho Posted October 6, 2006 Share Posted October 6, 2006 Hi, ive been doing html for a while now, but I have a problem... I want my menu to be a horizontal menu across the page instead of a vertical one. I have searched through w3 archives and I cant see anything that would help. I know that I can do a marquee, but I dont want my images scrolling. I need them fixed in place horizontally. Please help me Link to comment Share on other sites More sharing options...
aspnetguy Posted October 6, 2006 Share Posted October 6, 2006 HTML <div id="menu"> <ul> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> </ul></div> CSS #menu ul li {display: inline}#menu ul li a img {border: 0} Link to comment Share on other sites More sharing options...
Kokisho Posted October 6, 2006 Author Share Posted October 6, 2006 Sorry, I seem to have gotten mixed up. I dont want a menu going down the page, I want it going across the page. Thanks, but if you could PLEASE edit it so it goes across I shall be REALLY grateful. Link to comment Share on other sites More sharing options...
real_illusions Posted October 6, 2006 Share Posted October 6, 2006 did you try the code?because it does give you a horizontal menu Link to comment Share on other sites More sharing options...
aspnetguy Posted October 6, 2006 Share Posted October 6, 2006 Sorry, I seem to have gotten mixed up. I dont want a menu going down the page, I want it going across the page. Thanks, but if you could PLEASE edit it so it goes across I shall be REALLY grateful.You have to use the CSS code too, the CSS makes it a horizontal menu Link to comment Share on other sites More sharing options...
Skemcin Posted October 6, 2006 Share Posted October 6, 2006 Sorry, I seem to have gotten mixed up. I dont want a menu going down the page, I want it going across the page. Thanks, but if you could PLEASE edit it so it goes across I shall be REALLY grateful.judging by your reply, you don't seem to understand the code by looking at it. real_illusions has provided the code that works according to your specifications. What might help, is to see the code as if it were saved in a file:<!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>Horizontal Menu</title><style type="text/css">#menu ul li {display: inline}#menu ul li a img {border: 0}</style></head><body><div id="menu"> <ul> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> <li><a href="somewhere.html"><img src="someimage.gif" alt=""/></a></li> </ul></div></body></html> Copy that and paste into notpad. Save as temp.htm and then open in your browser.note - what a coincidence - solution provided by "real" "illusion" and the code "appears" to be nothing close to the desired result - how ironic - that IS a real illusion. Link to comment Share on other sites More sharing options...
aspnetguy Posted October 6, 2006 Share Posted October 6, 2006 actually I provided the solution Link to comment Share on other sites More sharing options...
Kokisho Posted October 6, 2006 Author Share Posted October 6, 2006 Sorry, im a bit of an idiot when it comes to this, how exctly do I enter in the CSS code? Do I put it in with the HTML code?(Oh, and I dont really know XHTML) Link to comment Share on other sites More sharing options...
real_illusions Posted October 6, 2006 Share Posted October 6, 2006 actually I provided the solution hehe..yeah..you did..maybe skemcin likes me better than you :)anyway..Kokishofollow what skemcin has told you. Failing that, bookmark this page then go right back to this page http://www.w3schools.com/html/html_intro.aspthen..when you've learnt the basics, come back to this post and follow skemcins post again.it seems you haven't read anything about html at all Link to comment Share on other sites More sharing options...
Kokisho Posted October 6, 2006 Author Share Posted October 6, 2006 Oh, sorry, I followed Skemkin's instructions and it worked completely, THANKYOU! But I cant find where to input the background image... Ive checked and rechecked, but I cant see it. Would I have to enter it in. Probably so. Ill try that. Link to comment Share on other sites More sharing options...
Kokisho Posted October 6, 2006 Author Share Posted October 6, 2006 Oh, sorry, I followed Skemkin's instructions and it worked completely, THANKYOU! Link to comment Share on other sites More sharing options...
Skemcin Posted October 7, 2006 Share Posted October 7, 2006 actually I provided the solution sorry - I'm not sure how my brain incorrectly registered that . . . I do apologize . . . you could have just edited my post . . . lol Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now