Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

centre widget and have a forecast one side and web cam image

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

centre widget and have a forecast one side and web cam image

Post by ace2 »

I'm trying to put on one line, weather station current conditions on the left, 7 day forecast in the middle and clickble web cam image on the right.

I'll really stuck!!!!

this is the 7 day forecast widget reduced to suit users.on.net/~ace2/indextest2.htm

my end result i want to have is to look like this

Image

the weather widget code is

Code: Select all

<style> 
.sbTable { text-align: center;background-color: #678090; } 
.sbLoc1 { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold;text-transform: uppercase; color: #ffffff; } 
.sbLoc2 { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold; text-transform: uppercase;color: #ffffff; } 
.sbDay { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold;color: #ffffff; } 
.sbTemp { font-family:verdana;font-size:7pt; color: #ffffff; } 
.sbIcon { width:30px; height:30px; } 
.sbLink { font-family: Verdana, Helvetica, sans-serif;font-size:7pt; font-weight: bold;text-transform: lowercase;  } 
</style>
 
<!-- BEGIN 7 DAY HORIZONTAL WIDGET (don't forget the style sheet!) --> 

<div style=width:10% ;border:left;'><script type="text/javascript">var sbLoc=282;var sbDays=7; document.write('<scr'+'ipt src="'+document.location.protocol+'//'+( document.location.protocol.toLowerCase()=='https' ? 'secure' : 'www') + '.seabreeze.com.au/members/weather/shared/bar.aspx?loc='+sbLoc+'&days='+sbDays+'&icons=0"></scr'+'ipt>');  </script></div> 
<br />
with my cam and cumulus current conditions as

Code: Select all

<a href="cam.htm"><img src="snapshot.jpg" alt="snapshot.jpg"width=21% align="right" /></a>
<img src="images/icons/forecast_<#IsFreezing>_<#isdaylight>_<#forecastnumber>.png" alt="Current forecast icon" title="<#forecast>" />
<p>Forecast: <#forecast></p>
Also wanted a piece of text under web cam image saying clickable link,,


If some one can work this out for me, great.....
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by ace2 »

I even tried to put it into a table

Code: Select all

<style> 
.sbTable { text-align: center;background-color: #678090; } 
.sbLoc1 { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold;text-transform: uppercase; color: #ffffff; } 
.sbLoc2 { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold; text-transform: uppercase;color: #ffffff; } 
.sbDay { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold;color: #ffffff; } 
.sbTemp { font-family:verdana;font-size:7pt; color: #ffffff; } 
.sbIcon { width:30px; height:30px; } 
.sbLink { font-family: Verdana, Helvetica, sans-serif;font-size:7pt; font-weight: bold;text-transform: lowercase;  } 
</style>

<table>

<tr>
<td><img src="images/icons/forecast_0_0_1.png" alt="Current forecast icon" title="Settled fine" ></td>

<td><div style='width:50%;border:none;'><script type="text/javascript">var sbLoc=282;var sbDays=7; document.write('<scr'+'ipt src="'+document.location.protocol+'//'+( document.location.protocol.toLowerCase()=='https' ? 'secure' : 'www') + '.seabreeze.com.au/members/weather/shared/bar.aspx?loc='+sbLoc+'&days='+sbDays+'&icons=0"></scr'+'ipt>');  </script></div></td>
<td><a href="cam.htm"><img src="snapshot.jpg" alt="snapshot.jpg"width=21% align="right" /></a> </td>
</tr>
<tr>
</table>
but it just wont centre the widget at all..(and text missing from current forecast)plus screws the formatting up below...

I'm sure someones got the answer!!!!
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: centre widget and have a forecast one side and web cam i

Post by beteljuice »

Try:

Code: Select all

<!-- PUT THIS IN THE <head> SECTION -->
<style type="text/css"> 
.sbTable { text-align: center;background-color: #678090; height: 120px; width: 100%; } /* modified */
.sbLoc1 { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold;text-transform: uppercase; color: #ffffff; } 
.sbLoc2 { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold; text-transform: uppercase;color: #ffffff; } 
.sbDay { font-family: Verdana, Helvetica, sans-serif;font-size:9pt; font-weight: bold;color: #ffffff; } 
.sbTemp { font-family:verdana;font-size:7pt; color: #ffffff; } 
.sbIcon { width:30px; height:30px; } 
.sbLink { font-family: Verdana, Helvetica, sans-serif;font-size:7pt; font-weight: bold;text-transform: lowercase;  } 
</style>
<!-- END head -->



<!-- forecast / widget / cam container (everything sized to forecast icon) -->
<div style="width: 100%;">
<table style="border-collapse: collapse; width: 100%;" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td style="padding: 0px; width: 120px;">
                <img style="width: 120px;" src="images/icons/forecast_<#IsFreezing>_<#isdaylight>_<#forecastnumber>.png" alt="Current forecast <#forecast>" title="Current forecast <#forecast>" />
            </td>
            <td style="padding: 0px;">
<script type="text/javascript">var sbLoc=282;var sbDays=7; document.write('<scr'+'ipt src="'+document.location.protocol+'//'+( document.location.protocol.toLowerCase()=='https' ? 'secure' : 'www') + '.seabreeze.com.au/members/weather/shared/bar.aspx?loc='+sbLoc+'&days='+sbDays+'&icons=0"></scr'+'ipt>');  </script>
            </td>
            <td style="width: 212px; padding: 0px;">
                <a href="cam.htm"><img style="height: 120px;" src="http://users.on.net/~ace2/snapshot.jpg" alt="Click for WebCam" title="Click for WebCam" /></a>
            </td>
        </tr>
    </tbody>
</table>
</div>
<!-- END forecast / widget / cam container -->
Image
......................Imagine, what you will KNOW tomorrow !
hills
Posts: 692
Joined: Sat 26 Dec 2009 8:52 am
Weather Station: Fine Offset WH1091
Operating System: Raspbian Buster
Location: Crafers, South Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by hills »

hmmm.. I put that forecast into mine back in 2011 and I can remember it being a pain to get it how it is on my page, let alone trying to put it between a webcam and the other forecast. You're welcome to view my page source if that helps at all. From memory I also had to make changes to the .css file as well.
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by ace2 »

beteljuice wrote:try :

Your a legend Beteljuice.......

Also perfect but will do...

only 2 thing not right, forecast text missing and on reduce of window in IE, the whole line(pict x2 and widget) is over the page(extends past border), might be my IE(IE is shit anyway)

is it all possible to have text under the web cam image that say 'click picture to view)

I know i'm asking too much, But i'm almost bald, i can't afford to lose any more hair!!!!!
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: centre widget and have a forecast one side and web cam i

Post by beteljuice »

ace2 wrote:... forecast text missing and on reduce of window in IE, the whole line(pict x2 and widget) is over the page(extends past border)
I deliberately left it 'clean' - forecast and webcam click instruction are on mouse-over.
Should you wish to ruin change it then in the appropriate <td> section(s) simply add
<br />blah blah blah

The line will break off the page with ANY browser if you reduce the page width enough !
It should resize 'down' to a more than acceptable width ?
Image
......................Imagine, what you will KNOW tomorrow !
hills
Posts: 692
Joined: Sat 26 Dec 2009 8:52 am
Weather Station: Fine Offset WH1091
Operating System: Raspbian Buster
Location: Crafers, South Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by hills »

Wow!! That looks great, well done! :clap:
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by ace2 »

I'm very happy with the results.. :D

No way i could have done that!!!!! :bash:

my coding is very limited/basic :? .................


so a big thank you to beteljuice :clap:
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by ace2 »

Sorry to re open this one, but I can't figure out this problem, I've updated all my pages to HTML 5 and although this forecast container works fine, I've noticed the image from the web cam is 1 or 2 pixels below the forecast widget
After some testing, it seems to be the change to HTML 5 <head>, it's only effected if I change the head and meta to suit HTML 5.
Adjusting the size of image still doesn't solve it as it doesn't seem level with the rest...

Any ideas???
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: centre widget and have a forecast one side and web cam i

Post by beteljuice »

It seems to be the sbTable no longer fully honouring the nested border collapses,

In the CSS for sbTable try adding ..
margin-top: -3px;

Don't know why that value, and it's strange fiddle, but it works in FireFox ....
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: centre widget and have a forecast one side and web cam i

Post by ace2 »

beteljuice wrote:It seems to be the sbTable no longer fully honouring the nested border collapses,

In the CSS for sbTable try adding ..
margin-top: -3px;

Don't know why that value, and it's strange fiddle, but it works in FireFox ....
Perfect, i don't know why I didn't try that.

So once again thank you so much for your briliant work.....
:D
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
Post Reply