How to apply one HTML code to all pages of my site

  • 1
  • Question
  • Updated 7 years ago
  • Answered
Hi I recently created a drop down menu for my website http://skyidentstest.yolasite.com/ using HTML. the drop down menu is working, but how can I apply this to all my sites pages, without having adding it to each page manually, which would be a pain since the menu would be changed regularly.

Regards
Edmund
Photo of satidents

satidents

  • 78 Posts
  • 4 Reply Likes

Posted 7 years ago

  • 1
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Edmund you can do that by using the Save As facility. This is most efficiently used before customising the page content.

For your need of being able to make changes to your menu in the future that would require a change for every occurrence of your menu so in fact for each page. The menu code uses an unordered list to link to page anmes with as you say HTML rather than a style sheet. If you can predict future pages then it is worthwhile creating the reserved pages now and wgen they come online just customise the content. You could put a notice in those pages advising users that this will be used in future. Because your menu is so extensive and you have already thought of the "pain" in making changes across the board, then I would reconsider the menu itself and look for a fully fledged CSS menu so that you can make single changes being reflected in all the menus used. You would still need to create some additional dummy pages in reserve but you could rename them at the time of bringing them online.
Photo of satidents

satidents

  • 78 Posts
  • 4 Reply Likes
What CSS menu creator would you recommend for me to switch to?
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Can you give me a day to search this out and possibly think of work arounds?
Are you using Yola Silver?
Photo of satidents

satidents

  • 78 Posts
  • 4 Reply Likes
Yes I am using yola silver, There will be 126 pages using the drop down menus, I am happy with the css3menu.com drop down menu. It will take alot of work updating it to all the pages, but it should be worth it :)
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Hello skyidents. Sanja responded to a question of a similar nature to this one and there is a possibility that you may be able to add your HTML to effect your whole site. It isn't known at this stage but she recommended trying it out on a test site first. If it works you are in tthe winners circle.

The thread: http://forum.yola.com/yola/topics/wha...
Photo of satidents

satidents

  • 78 Posts
  • 4 Reply Likes
Thanks Gop, I now have drop down menus on all my pages! Is their any way I can align the menu to the center, instead of the left hand side www.skyidents.com
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
I'll try and get a way to do this if I can and report back here.

There may be a typo in your menu items. "Documentarys" is spelled "Documentaries" unless it is referring to a proper noun or name of a named object
Photo of satidents

satidents

  • 78 Posts
  • 4 Reply Likes
Thanks Gop and thanks for the spelling correction, I will update it soon.
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Hello Edmund,

You have a css file stored in your file Manager called "style.css". I think the position of the menu is directed by this file.

You will need to edit this with Notepad. You will have a copy of this I think in your markup.

Make sure you keep an unedited copy in case it just hangs up. I suggest also creating a test site to do this first.

Locate the lines:

ul#css3menu1 ul ul{
position:absolute;left:100%;top:0;}
ul#css3menu1{
padding:1px 1px 1px 0;display:block;font-size:0;float:left;}
ul#css3menu1 li{
display:block;white-space:nowrap;font-size:0;float:left;}

Edit the "style.css" file with Notepad.
Change "........;left:100%;top:0;}"

to "........;left:50%;top:0;}"

Save it as the original name back in your File Manager

Save and publish.

If this works I don't expect it to be positioned exactly, you will have to determine the best position by adjusting the % figure.

If it doesn't work:

Change "float:left;" to "float:none;" in both occurrences, but one at a time and check after each change.

Save & Publish
Photo of satidents

satidents

  • 78 Posts
  • 4 Reply Likes
Still haven't got it to work. It just changes the alignment of things in the menu itself?