cloudy cloudy

Author Topic: Ken's parser display anomaly  (Read 4225 times)

0 Members and 1 Guest are viewing this topic.

Offline Devil

  • Posts: 1,520
  • Cyprus 3325'E 3455'N 300 m up
    • Mosfiloti weather services
Ken's parser display anomaly
« on: April 16, 2007, 06:59:05 AM »
I've been playing around with the layout of my forecasts on the web. The default 640 pixel width is not over-brilliant, so I tried 100%, then 95%. In all cases, the last icon appears cramped up. The others are evenly spaced, but the space before the last one is shorter and the space within the table cell is narrower (see the Low temp in the example). Do others experience this anomaly?

Another small anomaly that may appear is, under some conditions of spacing etc., you may get under the icons something like:
Partly CloudyMostly Cloudy Rain likely   Fog  Mostly CloudyMostly Cloudy
(this was particularly noticeable with my French and Greek translations which had much longer words than English).
I found empirically that the best results were obtained by changing the Cell Padding to:
        <table width="100%" border="0" cellpadding="3" cellspacing="0">
in the if ($printIcons) section. (Checked with various languages and various widths.)

Offline saratogaWX

  • Global Moderator
  • Posts: 5,939
  • Ken True
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Ken's parser display anomaly
« Reply #1 on: April 16, 2007, 09:00:06 AM »
Nice touch, Devil!

Don't forget that you can apply unique styling to the class of WXSIMforecast (.WXSIMforecast) to change fonts and add overall margin/padding as need be.

Best regards,
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates