Author Topic: menu bar/index page  (Read 493 times)

0 Members and 1 Guest are viewing this topic.

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
menu bar/index page
« on: July 26, 2018, 02:49:31 PM »
I have added the scripts for State and USA extremes. After doing so, the left menu bar does not extend as far as the data on the index.php page. This only happens on the index page, all other pages appear to be OK. the problem can be seen at scannorthcounty.net.

Any suggestions to correct this isue would be appreciated.

Thanks,

John
John
Westminster, MA USA

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: menu bar/index page
« Reply #1 on: July 27, 2018, 11:11:49 PM »
Sure.. the content part of the page is not as long as the extended menubar.  Try putting
Code: [Select]
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
before the
Code: [Select]
</div><!-- end main-copy --> on the page to extend it down with whitespace.  Yes, it's a kludge, but a useful one.  You may have to vary the number of the <p>&nbsp;</p> entries to achieve the desired effect.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: menu bar/index page
« Reply #2 on: July 28, 2018, 10:41:32 AM »
Thanks Ken, I was able to extend the page down past the last item on the menu bar. I notice that the footer is separate from the main page and much wider. It may have always been that way, but all my other pages have it correct with the same width of the page.

Again, thanks for all the support you provide, it is a tremendous help to those of us new to programming.

John
John
Westminster, MA USA

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: menu bar/index page
« Reply #3 on: July 28, 2018, 11:15:52 AM »
You're welcome, John.

If you take a look at the XHTML Validator there are a few, easily fixed HTML issues.

Most of the cited errata are due to a couple of lines in your flyout-menu.xml
Code: [Select]
<item caption="Jetstream" link="https://www.ventusky.com/?p=25.0;-53.8;3&l=wind-300hpa" target="_blank"/> and
Code: [Select]
<item caption="Historical Data" link="http://www.findu.com/cgi-bin/wxpage.cgi?call=FW0917!Westminster&last=120" target="_blank"/>
<item caption="Data Quality" link="wxcwopstats.php"/>
<item caption="NWS CWOP Data Feed" link="https://www.wrh.noaa.gov/mesowest/timeseries.php?wfo=mtr&sid=F0917&num=48" target="_blank"/>
<item caption="MesoWest Data Feed" link="https://mesowest.utah.edu/cgi-bin/droman/meso_base_dyn.cgi?stn=F0917" target="_blank"/>
in each of the link= strings that contain '&', you need to replace those with '&amp;amp;' to make the XML validate.

Example
Code: [Select]
<item caption="NWS CWOP Data Feed" link="https://www.wrh.noaa.gov/mesowest/timeseries.php?wfo=mtr&sid=F0917&num=48" target="_blank"/> would become
Code: [Select]
<item caption="NWS CWOP Data Feed" link="https://www.wrh.noaa.gov/mesowest/timeseries.php?wfo=mtr&amp;amp;sid=F0917&amp;amp;num=48" target="_blank"/>  This funny stuff is caused by the XHTML requirement that ampersands can't be 'naked' and have to be done as HTML entities &amp; -  The XML parser will automatically change &amp; to & itself, so the &amp;amp; gets changed to &amp; which leaves the proper HTML entitity in place for the URL in the HTML, and the browser itself will replace the remaining &amp; with & when the URL is clicked.
Doing these changes in your flyout-menu.xml will remove a bunch of XHTML errata from the validator.

You have a line
Code: [Select]
<link href="css/hover-tiny.css" rel="stylesheet" media="all"
which is both incomplete and in the <body> section of the page.  Change it to
Code: [Select]
<link href="css/hover-tiny.css" rel="stylesheet" media="all" />[/code] and move it to above the </head> line in the page. Then revalidate to see if the errata are now gone.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Johnmac

  • Senior Contributor
  • ****
  • Posts: 170
    • Westminster Massachusetts Weather
Re: menu bar/index page
« Reply #4 on: July 28, 2018, 11:52:40 AM »
Ken, Fantastic. I have corrected all the errors and the page loads correctly now. I also removed the original fix of "<p>&nbsp;</p>", as it was no longer needed.

I thought I had made those corrections to "&amp;amp; a while ago, but I guess not.

Again thanks for the help and learning experience.

John
John
Westminster, MA USA

 

anything