Author Topic: wxnewpage code  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
wxnewpage code
« on: December 06, 2016, 11:26:14 AM »

The other day I posted that I was trying to put this link: into the newpage template that comes with the USA base files. A couple of good people responded very quickly and they set me up with the code right away. I tried it and all I would get was warning and error messages.
Warning: session_start(): Cannot send session cache limiter - headers already sent
Warning: Cannot modify header information -
and so on

I posted my results and the next response I received was from Jachym, he basically said that he kind of new what my problem was and that if I emailed him, what I had, he would take a look at it. It got on it right away and through some other conversations he not only corrected my original request but solved another issue.

The other issue was the link overflowing out of the newpage template framework: I know some of you have the same issue because your pages looked like mine before Jachym redid the code.

Anyway here are the before and after links:

Here is what the code looks like:

Thanks to ValentineWeather and sacreyweather for starting me up and special thanks to Jachym for finishing it up!!

Finally a big Whew, if not for all that help on this forum, it would have taken me years to understand and get this far, most likely it would not have been done.

Again thanks, and I hope this will benefit others.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: wxnewpage code
« Reply #1 on: December 06, 2016, 11:29:09 AM »

you are welcome.

Just to add to it, the trick is very simple, you need to tell the image to scale to the width of the parent container.

This is done by adding the width property in the style attribute of the image and then also setting the margin so that it is centered.

Like this:

Code: [Select]
<img src="" style="width:98%;margin:0 auto">

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6326
Re: wxnewpage code
« Reply #2 on: December 06, 2016, 11:51:09 AM »
Looks better  =D&gt;