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
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
adding pictures to the weatherstyle.css
- MickinMoulden
- Posts: 499
- Joined: Mon 20 Dec 2010 12:12 pm
- Weather Station: WS-1081 with rain gauge mod
- Operating System: Windows 7 & 1.9.3 b1059
- Location: Palmerston, NT, Australia
- Contact:
adding pictures to the weatherstyle.css
I've previously added my own photo. That was fine. Now I want to add multiple photo's, left and right in the style sheet. How do I do that?
-
DaveNZ
- Posts: 373
- Joined: Mon 07 Dec 2009 10:27 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 64-bit
- Location: Howick, Auckland, New Zealand
- Contact:
Re: adding pictures to the weatherstyle.css
I would do it in the following way: lay my site out in table format.
And the css for section
Some would choose to do it with divs, but I have never had much luck with getting those to align the way I want.
Code: Select all
<body>
<table width="100%" height="100%">
<tr>
<td align="left" class="section">
<img src="image1.jpg" alt="image1" />
</td>
<td class="section">
your central content here
</td>
<td align="right" class="section">
<img src="image2.jpg" alt="image2" />
</td>
</tr>
</table>
</body>
Code: Select all
td.section {
vertical-align:top;
}- MickinMoulden
- Posts: 499
- Joined: Mon 20 Dec 2010 12:12 pm
- Weather Station: WS-1081 with rain gauge mod
- Operating System: Windows 7 & 1.9.3 b1059
- Location: Palmerston, NT, Australia
- Contact:
Re: adding pictures to the weatherstyle.css
So that would put a picture either side? And would this only effect the page that the html was added in. I'm not sure where I should put the css code in the stylesheet. I'd be looking at putting about 3 photo's down each side for all of my pages.DaveNZ wrote:I would do it in the following way: lay my site out in table format.
And the css for sectionCode: Select all
<body> <table width="100%" height="100%"> <tr> <td align="left" class="section"> <img src="image1.jpg" alt="image1" /> </td> <td class="section"> your central content here </td> <td align="right" class="section"> <img src="image2.jpg" alt="image2" /> </td> </tr> </table> </body>Some would choose to do it with divs, but I have never had much luck with getting those to align the way I want.Code: Select all
td.section { vertical-align:top; }
-
DaveNZ
- Posts: 373
- Joined: Mon 07 Dec 2009 10:27 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 64-bit
- Location: Howick, Auckland, New Zealand
- Contact:
Re: adding pictures to the weatherstyle.css
It would put a picture either side, yes. But it would only affect one page, and using the cumulus template you would have to edit every web page if you wanted it on all pages. Using php it would be easier.MickinMoulden wrote: So that would put a picture either side? And would this only effect the page that the html was added in. I'm not sure where I should put the css code in the stylesheet. I'd be looking at putting about 3 photo's down each side for all of my pages.
I would think using css, it would be a hard task...any css experts reading?
-
Synewave
- Posts: 642
- Joined: Mon 25 Jan 2010 1:55 pm
- Weather Station: Watson W-8681
- Operating System: Raspian
- Location: Brighton, UK
- Contact:
Re: adding pictures to the weatherstyle.css
I'm by no means a CSS expert, but one method I use on my status page to override the background picture coded in the css is:
You could code a <#webtag> in the picture filename, i.e. to change the picture if it was day or night using the <#isdaylight> tag.
Code: Select all
<link href="weatherstyle.css" rel="stylesheet" type="text/css" />
<style type="text/css"> body { background-image: url("myimages/statusbackground.png") } </style>
-
DaveNZ
- Posts: 373
- Joined: Mon 07 Dec 2009 10:27 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 64-bit
- Location: Howick, Auckland, New Zealand
- Contact:
Re: adding pictures to the weatherstyle.css
I would think 3 photos down each side using CSS wouldn't be possible without adding extra html elements into your web pages.
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: adding pictures to the weatherstyle.css
I think CSS 3 will make all this a lot easier. Not much help now, though...
Steve
- MickinMoulden
- Posts: 499
- Joined: Mon 20 Dec 2010 12:12 pm
- Weather Station: WS-1081 with rain gauge mod
- Operating System: Windows 7 & 1.9.3 b1059
- Location: Palmerston, NT, Australia
- Contact:
Re: adding pictures to the weatherstyle.css
Yes, I don't think there is anyway around it at the moment. Think I might use the float technique in CSS like this:DaveNZ wrote:I would think 3 photos down each side using CSS wouldn't be possible without adding extra html elements into your web pages.
Code: Select all
img.floatRightClear {
float: right;
clear: right;
margin: 4px;
}
Code: Select all
<body>
<img src="sunset.gif" class="floatRightClear">
<img src="sunset2.gif" class="floatRightClear">
</body>
-
DaveNZ
- Posts: 373
- Joined: Mon 07 Dec 2009 10:27 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 64-bit
- Location: Howick, Auckland, New Zealand
- Contact:
Re: adding pictures to the weatherstyle.css
You could try it, and also add the following to your image styles. This will make sure any text flows over the top of the images instead of underneath.MickinMoulden wrote:Seems to be alot of ways to do it heyCode: Select all
<body> <img src="sunset.gif" class="floatRightClear"> <img src="sunset2.gif" class="floatRightClear"> </body>![]()
Code: Select all
z-index:-1
I was looking at this the other day. Looks like heaps of new features. Barely any browser support for most of it yet thoughsteve wrote:I think CSS 3 will make all this a lot easier. Not much help now, though...
- MickinMoulden
- Posts: 499
- Joined: Mon 20 Dec 2010 12:12 pm
- Weather Station: WS-1081 with rain gauge mod
- Operating System: Windows 7 & 1.9.3 b1059
- Location: Palmerston, NT, Australia
- Contact:
Re: adding pictures to the weatherstyle.css
Yup, already done the tag (see my site), works to.Synewave wrote:I'm by no means a CSS expert, but one method I use on my status page to override the background picture coded in the css is:You could code a <#webtag> in the picture filename, i.e. to change the picture if it was day or night using the <#isdaylight> tag.Code: Select all
<link href="weatherstyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-image: url("myimages/statusbackground.png") } </style>
Yours is real nice, that's where I got the idea of changing pictures, but to change to the current weather conditions.
So your code is in the HTML on all pages. But how do they change. Is png like a gif so that the
is just one picture file?url("myimages/statusbackground.png")
-
Synewave
- Posts: 642
- Joined: Mon 25 Jan 2010 1:55 pm
- Weather Station: Watson W-8681
- Operating System: Raspian
- Location: Brighton, UK
- Contact:
Re: adding pictures to the weatherstyle.css
Yes, it is just an animated gif, so essentially one file.MickinMoulden wrote:Yup, already done the tag (see my site), works to.Synewave wrote:I'm by no means a CSS expert, but one method I use on my status page to override the background picture coded in the css is:You could code a <#webtag> in the picture filename, i.e. to change the picture if it was day or night using the <#isdaylight> tag.Code: Select all
<link href="weatherstyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-image: url("myimages/statusbackground.png") } </style>
Yours is real nice, that's where I got the idea of changing pictures, but to change to the current weather conditions.
So your code is in the HTML on all pages. But how do they change. Is png like a gif so that theis just one picture file?url("myimages/statusbackground.png")
Edit: sorry the one on the status page is just one picture (made up of two 'stuck' together) and is just a png.
The ones on my other pages are animated gifs.
-
tjaliwalpa
- Posts: 293
- Joined: Sun 18 Apr 2010 9:47 am
- Weather Station: Davis VP2
- Operating System: Linux Lite Ubuntu 16.04
- Location: Karoonda, SA
- Contact:
Re: adding pictures to the weatherstyle.css
Here is another possibility which uses the body and allows the images to swap and be in a set position. It is closer to what you wanted to do in the first place.
Creat images temp_00.jpg (image you want for no alarm), temp_01.jpg (image you want for high alarm)and temp_10.jpg Image you want for low alarm). Use the tags to create the names like this:
body {
background-image: url("images/temp_<#lowtempalarm><#hightempalarm>.jpg");
background-repeat: no-repeat;
background-position: 0% 0%;
}
The background-position allows you to place the image where you want on the screen in relation to the top left of the screen (or frame).
Creat images temp_00.jpg (image you want for no alarm), temp_01.jpg (image you want for high alarm)and temp_10.jpg Image you want for low alarm). Use the tags to create the names like this:
body {
background-image: url("images/temp_<#lowtempalarm><#hightempalarm>.jpg");
background-repeat: no-repeat;
background-position: 0% 0%;
}
The background-position allows you to place the image where you want on the screen in relation to the top left of the screen (or frame).
Bob
- MickinMoulden
- Posts: 499
- Joined: Mon 20 Dec 2010 12:12 pm
- Weather Station: WS-1081 with rain gauge mod
- Operating System: Windows 7 & 1.9.3 b1059
- Location: Palmerston, NT, Australia
- Contact:
Re: adding pictures to the weatherstyle.css
Yes, as I've already mentionedtjaliwalpa wrote:Here is another possibility which uses the body and allows the images to swap and be in a set position. It is closer to what you wanted to do in the first place.
Creat images temp_00.jpg (image you want for no alarm), temp_01.jpg (image you want for high alarm)and temp_10.jpg Image you want for low alarm). Use the tags to create the names like this:
body {
background-image: url("images/temp_<#lowtempalarm><#hightempalarm>.jpg");
background-repeat: no-repeat;
background-position: 0% 0%;
}
The background-position allows you to place the image where you want on the screen in relation to the top left of the screen (or frame).
, and have been discussing this with Dave in another thread, but thought it would be better suited here.Yup, already done the tag (see my site), works to.
What you've stated is excactly what I have done, and is already working on my site, however, I'm looking at adding more, so that I have say, 3 each side. Including storm pictures storm_1111.jpg, storm_1011.jpg etc. This is to correspond with day, gust, temp and rain rate alarms. All the pictures are done.
I'll let you know when I'm done, and I'll holler if I get stuck, but I've got at least 3 different ways to do it. And I've looked at PHP and can't see how it can be done any easier.
- MickinMoulden
- Posts: 499
- Joined: Mon 20 Dec 2010 12:12 pm
- Weather Station: WS-1081 with rain gauge mod
- Operating System: Windows 7 & 1.9.3 b1059
- Location: Palmerston, NT, Australia
- Contact:
Re: adding pictures to the weatherstyle.css
OK....tried it this way, but I've stuffed it up big time.... The photo's on the other hand look great and do excactly what I want. There are a total of 17 photo's, and display depending on the weather at the time of the upload. As it's 01:30, I'm going to have to leave it in the mess that it's in and try something later.DaveNZ wrote:I would do it in the following way: lay my site out in table format.
And the css for sectionCode: Select all
<body> <table width="100%" height="100%"> <tr> <td align="left" class="section"> <img src="image1.jpg" alt="image1" /> </td> <td class="section"> your central content here </td> <td align="right" class="section"> <img src="image2.jpg" alt="image2" /> </td> </tr> </table> </body>Some would choose to do it with divs, but I have never had much luck with getting those to align the way I want.Code: Select all
td.section { vertical-align:top; }
-
DaveNZ
- Posts: 373
- Joined: Mon 07 Dec 2009 10:27 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 64-bit
- Location: Howick, Auckland, New Zealand
- Contact:
Re: adding pictures to the weatherstyle.css
I see what the problem is! The data table (inside the table you've added) also has the attribute width="100%". Need to remove that.
Then it will minimise the space it needs as far as I can recall. To make it take up the whole middle table cell, you can use the style "margin:auto"
Then it will minimise the space it needs as far as I can recall. To make it take up the whole middle table cell, you can use the style "margin:auto"

