Jump to content
Sign in to follow this  
TheOneHat

Drop down menu template

Recommended Posts

Greetings,I have been through the forums and through w3schools tuts to locate how to pull in a section of an html doc from another doc. I would prefer to pull it off of the style sheet as that will enable all new sheets to be able to pull it in as well. What I have is a few pages at the moment, but that looks as if it will change momentarily.I wish to pull into each page a drop down menu w/ out the cut and paste routine I am going through, then needing to readjust all the links to suit my new needs.I am a newb in the world of html and CSS, with no practical working knowledge of Javascript as of yet, so all and any help is appreciated very much.my code is as follows for the drop down menu that I would like to pull into each page.

<div id="dropDownMenu">	<ul>		<li><a href="default.html">Introductions</a>			<ul>			<li><a href=""></a></li>			<li><a href=""></a></li>			<li><a href=""></a></li>			<li><a href=""></a></li>				</ul></li>		<li><a href="default.html"></a>			<ul>			<li><a href=""></a></li>			<li><a href="</a></li>			<li></li>				</ul></li>		<li>Three</li>		<li>Four</li>		<li>Five</li>		</ul></div><!--end #dropDownMenu--></div><!--end #header-->

I do not know whether to ask in the html section or the CSS section of the forums.Thank you.

Share this post


Link to post
Share on other sites

What you have up there, is not a drop down menu, but un-ordered list. If i got you wright, you said you want to have a drop down menu in all your html pages, w/t copying and pasting the same thing in all the pages. What you are asking of, can not be done with html/css.

Share this post


Link to post
Share on other sites

Thanks for the reply O.,And correct thats an un-ordered list as I did not post the CSS in here.CSS is as follows. But if I have your answer correct, I can not pull in the script(html) so this is mute. Can someone direct me to where I can repost this question please. Javascript? PHP (most likely, though I have no experience with PHP at all)?

#dropDownMenu{	position:absolute; width:800px;	bottom:0px;	left:0px;	margin-top:10px; 	font-family:Arial, Helvetica, sans-serif; color:#EBEADF;	border:1px; border-style:solid; border-color:#C4C2AB;}#dropDownMenu ul{	padding:0px; margin:0px;}#dropDownMenu ul li{	height:25px; padding-left:3px;	display:inline; width:150px; float:left;	font-size:0.8em; text-transform:uppercase;}#dropDownMenu ul li ul{	visibility:hidden;}#dropDownMenu ul li:hover ul{	visibility:visible;}#dropDownMenu ul li a{	color:#666666; text-decoration:none;	background-color:#EBEADF;	line-height:25px; display:block; padding-left:8px;}#dropDownMenu ul li a:hover{	color:#333333; background-color:teal;}

Again, any help would be most appreciated.

Share this post


Link to post
Share on other sites

if you want the list item to appear in all your html w/t having the same list item code in all your html, then It can be done with php. EDIT: Note that it can also be done with js (external.js file), but when the visitor have his/her script disabled in the browser, it will not show. php is beta!

Edited by O. Samuel

Share this post


Link to post
Share on other sites

This would seem to be a flaw in html/css then IMO, as one can import reset and other style sheets, embed background img's and links, etc... One would think then that the principle of bringing in a small piece of script from elsewhere would work fine using just html and css.Thanks for the help O.

Share this post


Link to post
Share on other sites

Hi, Could you please send me the stylesheet? This in order to provide you fully support. Regards, Gaspare

Greetings,I have been through the forums and through w3schools tuts to locate how to pull in a section of an html doc from another doc. I would prefer to pull it off of the style sheet as that will enable all new sheets to be able to pull it in as well. What I have is a few pages at the moment, but that looks as if it will change momentarily.I wish to pull into each page a drop down menu w/ out the cut and paste routine I am going through, then needing to readjust all the links to suit my new needs.I am a newb in the world of html and CSS, with no practical working knowledge of Javascript as of yet, so all and any help is appreciated very much.my code is as follows for the drop down menu that I would like to pull into each page.
<div id="dropDownMenu">	<ul>		<li><a href="default.html">Introductions</a>			<ul>			<li><a href=""></a></li>			<li><a href=""></a></li>			<li><a href=""></a></li>			<li><a href=""></a></li>				</ul></li>		<li><a href="default.html"></a>			<ul>			<li><a href=""></a></li>			<li><a href="</a></li>			<li></li>				</ul></li>		<li>Three</li>		<li>Four</li>		<li>Five</li>		</ul></div><!--end #dropDownMenu--></div><!--end #header-->

I do not know whether to ask in the html section or the CSS section of the forums.Thank you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...