WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: Hfcomms on January 01, 2008, 01:13:34 PM

Title: Change Font Size And Position In Ajax Script
Post by: Hfcomms on January 01, 2008, 01:13:34 PM
I have been starting to play around with header graphics and have a long way to go.  I have an initial graphic up which is a little taller than the ajax default header size.  I'm wondering how to shift the temperature display in the header down and perhaps a way to change the size of the typefont.  Just looking at the script nothing jumps out at me for how to change any of the defaults in those areas.  Any pointers??  Thanks!!  Oh, and Happy New Year!!
Title: Re: Change Font Size And Position In Ajax Script
Post by: saratogaWX on January 01, 2008, 03:04:43 PM
I'm a bit confused about which temperature display you're referring to, but I think you mean the big temperature display at the right side of the header on each page.  If that's correct, the styling for that is controlled in the CSS (weather-screen.css) as
Code: [Select]
.headerTemp {
  font-size: 36px;
  font-weight: bold;
  position: absolute;
  right: .5ex;
  top: 0.18em;
}

The AJAX update process will only change the contents (i.e. the temperature), and not the formatting which is controlled by the CSS above.

Hope this helps...
Best regards,
Ken
Title: Re: Change Font Size And Position In Ajax Script
Post by: WeatherBeacon on January 01, 2008, 03:49:58 PM

Regarding the font itself, you may also simply use standard html to change the font size, color, face, etc., of any ajax item. For example, you may do something like:

   <b><font face="Arial" size="5"><span class="ajax" id="ajaxtemp">^vxv007^^uni007^</span></font></b>

Regards,

Kevin...
Title: Re: Change Font Size And Position In Ajax Script
Post by: Hfcomms on January 01, 2008, 03:52:20 PM
Thanks mucho Ken!!

Yes, that is what I meant.  I didn't know where to look for the coding on it.  I looked at the ajax script and the ajax interface on the index page and couldn't see where to make any changes as far as text.  Didn't think to look at the css file.  This has been a real learning experience for me and I'm making progress.  Looking forward to the updated templates that are coming in Jan.  It keeps getting better and better.

Thanks again,
Doug