Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Alignment Error in ajax-dashboard.php?

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Alignment Error in ajax-dashboard.php?

Post by William Grimsley »

Hi Ken,

I've just been playing with the forecast scripts again.

For some reason when I put this code into my ajax-dashboard.php file, there was a "very slight" alignment error.

This is my code:

Code: Select all

?php print "<td align=\"center\">$WUforecasticons[1]<br />$WUforecasttemp[0]</td>\n"; ?>
I tried changing: "<td align=\"center\"> to "<tr align=\"center\"> and that worked. But, it didn't rap the forecast words "Chance rain" like I want it too.

Please can you help?

Thanks,

William
water01
Posts: 3245
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Alignment Error in ajax-dashboard.php?

Post by water01 »

Try looking at the beginning of the line!!

You better start on that PHP course I pointed you at because this is obvious!!
David
Image
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Alignment Error in ajax-dashboard.php?

Post by William Grimsley »

Sorry, the code wasn't copied correctly, it does start with <? not ? :lol:

EDIT: Alignment issue fixed! I was doing this PHP coding right before bed, so no wonder it all went wrong.

This is why it wasn't aligning properly. There were two instances of <td align="center"> :lol:

I changed:

Code: Select all

<tr valign="left">
				  <?php print "<td align=\"center\">$WUforecasticons[0]<br />$WUforecasttemp[0]</td>\n"; ?>
To:

Code: Select all

<tr valign="left">
              
				  <?php print "<td align=\"center\">$WUforecasticons[0]<br />$WUforecasttemp[0]</td>\n"; ?>
Then, I changed:

Code: Select all

<table border="0" cellpadding="2" cellspacing="0">
To:

Code: Select all

<table border="0" cellpadding="1" cellspacing="1">
Then, the alignment issue dissapeared! :D
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Alignment Error in ajax-dashboard.php?

Post by William Grimsley »

Also, I've managed to XHTML validate my page, too! After many hours! :lol:
Post Reply