Page 2 of 2

Re: Space Weather

Posted: Sat 07 Nov 2015 7:57 pm
by gluepack
ok, I have modified my version to align (2nd/3rd table) data on %. If you have changed my original then I am not sure if the following will work. Two blocks of code changed...

Code: Select all

.noaatab td{font-weight:bold;padding-left:40px;border:1px solid black;}
.noaatab td.pc{padding-left:30px;padding-right:30px;text-align:right;} 
.noaatab td.first{padding-left:5px;color:red;}

Code: Select all

// split into array based on 2+ blanks in between
		$strdata = preg_split('/  +/',$intable[$j]);
		$strpc = ">";
		if (strpos($strdata[1], '%') !== false) $strpc = 'class="pc">'; 
// format table data row 
		$strtable .= '<tr><td class="first">'.$strdata[0].'</td><td '.$strpc.$strdata[1].'</td><td '.$strpc.$strdata[2].'</td><td '.$strpc.$strdata[3].'</td></tr>';
		}
Any problems will probably relate to changes in alignment code that have been made from my original which was written to suit my environment. Again, my level of knowledge may result in overkill ;)

Re: Space Weather

Posted: Tue 01 Dec 2015 9:26 pm
by gluepack
This was only from a link on the space weather page but, if you are looking for more content, you could always embed it...

http://services.swpc.noaa.gov/images/sw ... -large.gif

Image