TheOneHat Posted September 5, 2011 Share Posted September 5, 2011 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. Link to comment Share on other sites More sharing options...
Drycodez Posted September 6, 2011 Share Posted September 6, 2011 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. Link to comment Share on other sites More sharing options...
TheOneHat Posted September 6, 2011 Author Share Posted September 6, 2011 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. Link to comment Share on other sites More sharing options...
Drycodez Posted September 6, 2011 Share Posted September 6, 2011 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! Link to comment Share on other sites More sharing options...
TheOneHat Posted September 6, 2011 Author Share Posted September 6, 2011 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. Link to comment Share on other sites More sharing options...
Juventino69 Posted September 6, 2011 Share Posted September 6, 2011 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.