Raspberry WMR 928 Lauftext

all about Meteohub on the new Raspberry PI platform

Moderator: Mattk

User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 604
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Raspberry WMR 928 Lauftext

Post by wvdkuil »

kannschonsein wrote:hi wim,

unfortunately that does not really know

http://www.heilbronner-wetter.de/wetter ... /index.php


the frame is not displayed on the left, I can adjust the frame (php)?

I use Web to date 8 and have never left but it does not work.

do you have an idea?
This is a CSS "problem".
The path to the iframe goes:

body => main => mainbox => content => the iframe without a name

main is set in the css to be 100% wide => OK
mainbox is set in css to

Code: Select all

#mainbox {
width: 960px;
padding: 20px 0;
margin: 0 auto;
}
which specifies the width of the mainbox (960 px), the margin (0px) and that the mainbox should be centered (auto).

Then the content is set to always be at the right (float:right) and be only 680px wide.

Code: Select all

#content {
float: right;
width: 680px;
}
And in that 680px wide content you are putting an iframe with settings:

Code: Select all

<iframe src="http://heilbronner-wetter.de/weather2/index.php?p=10&lang=de&ipad" height="1000" width="180%" frameborder="0" scrolling="no" align="left">. .. . </iframe>
So the wide of the iframe is set to 180% = 1,8 * 680 = 1224 pixels and will extend to the right outside your main page.

The real contents of the iframe is 1100px so the remainning 114 px is to the left / right of the index.php you are displaying inside the iframe.

I made a screenshot to explain a bit as it is difficult to explain in "my" English.
Wim
Attachments
frame-css.jpg
frame-css.jpg (45.53 KiB) Viewed 4047 times
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 604
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Raspberry WMR 928 Lauftext

Post by wvdkuil »

@kannschonsein
To make life a little easier I enclose a modified index.php
1. make a backup of the weather2/index.php
2. unzip and upload the new index.php to weather2/

When you now use a template page with &ipad it will always fit exactly in the enclosing iframe or browser.
As long as the iframe is at least 800px.
If you want a smaller iframe, modify line 24 in weather2/styleMain30.css
from

Code: Select all

	min-width: 800px;	
to

Code: Select all

/*	min-width: 800px;	*/
example:
normal page: http://www.weerstation-leuven.be/weathe ... 11&lang=en
adaptable page: http://www.weerstation-leuven.be/weathe ... ng=en&ipad

Works far better than doing the calculations.

Wim
Attachments
index.php.zip
(6.78 KiB) Downloaded 279 times
kannschonsein
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: Thu Oct 30, 2014 9:47 am

Re: Raspberry WMR 928 Lauftext

Post by kannschonsein »

good Morning,

I think I'm on the right way

http://www.heilbronner-wetter.de
Attachments
frame_2.jpg
frame_2.jpg (51.18 KiB) Viewed 4036 times
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 604
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Raspberry WMR 928 Lauftext

Post by wvdkuil »

kannschonsein wrote:good Morning,

I think I'm on the right way

http://www.heilbronner-wetter.de
1. I do not understand: what is the problem with the image ?
2. You should replace the weather2/index.php as explained in viewtopic.php?f=60&t=10021&p=16421#p16418

So make a copy of weather2/index.php, unzip the attachement to that post, and upload it to your weather2/ folder.

Than the width of all pages will fit exactly inside the area you define.

Wim
kannschonsein
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: Thu Oct 30, 2014 9:47 am

Re: Raspberry WMR 928 Lauftext

Post by kannschonsein »

its all ok and it works just fine

I mean if you frame the weather warning separately
can use as the other pages with &ipad also
Post Reply