Centre widget html

YoWindow widget Questions, Suggestions and Bugs
Post Reply
User avatar
PernicketyPete
Posts: 55
Joined: Sun Apr 29, 2012 3:45 pm
Name: Pete
Location: Chilthorne Domer, Somerset, UK
Contact:

Centre widget html

Post by PernicketyPete »

Hi All
How can i get my widget to display in the middle of the page? instead of the default "left" position.

Many Thanks Pete.
Weather data suplied by Chilthorne Weather
Visit http://www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.
User avatar
hermanz
Posts: 1892
Joined: Thu Apr 08, 2010 3:21 pm
Name: Herman
Location: Nieuwegein, Netherlands

Re: Centre widget html

Post by hermanz »

Hi Pete :good:
Can You tell us more.

Is this for a website etc.


gr.
Herman :beer:
(Wheather on an I(phone,pad,pod) or Android, YoWindow what else )
User avatar
par
Posts: 8724
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: Centre widget html

Post by par »

Hey, Pete!
Can you give a link to your page with YoWindow widget installed?
Get YoWindow weather app for your phone or tablet.

Image Image Image
User avatar
PernicketyPete
Posts: 55
Joined: Sun Apr 29, 2012 3:45 pm
Name: Pete
Location: Chilthorne Domer, Somerset, UK
Contact:

Re: Centre widget html

Post by PernicketyPete »

Hi Par & Herman
Thanks for getting back to me.
Yes this is for my website. I would like to display my Yowindow widget in the centre of the web page, when the page is first loaded. At the moment my widget loads on the left of the page. I have tried the usual < p align="centre"> in various places in the widget code, but I can't manage to get it to work so that it will load in the centre of the page. How can I do this?

Par, how will the link help to load my widget in the centre of the page?

Thanks Pete.
Weather data suplied by Chilthorne Weather
Visit http://www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Centre widget html

Post by ikarus1969 »

Hi Pete!

In case it's not a typo try

Code: Select all

<p align="center">
instead of
PernicketyPete wrote:...< p align="centre">
PernicketyPete wrote:Par, how will the link help to load my widget in the centre of the page?
The link to your webpage will allow us to have a look at the html source-code of your page and see what's eventually missing, what's coded not correctly.
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
User avatar
PernicketyPete
Posts: 55
Joined: Sun Apr 29, 2012 3:45 pm
Name: Pete
Location: Chilthorne Domer, Somerset, UK
Contact:

Re: Centre widget html

Post by PernicketyPete »

Hi
Here is the link to my widget http://www.chilthorneweather.co.uk/yowindow_widget.html

Thanks Pete
Weather data suplied by Chilthorne Weather
Visit http://www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.
User avatar
par
Posts: 8724
Joined: Mon Sep 21, 2009 11:56 am
Name: Pasha
Location: Saint-Petersburg, Russia
Contact:

Re: Centre widget html

Post by par »

Unfortunately <p align="center"> will not work in this case.

You need to wrap widget code inside the following <div> tag

Code: Select all

<div style="width:440px; margin-left: auto;  margin-right: auto;">  
</div>
This is a standard approach in CSS.
This article explains why.
http://www.thesitewizard.com/css/center-div-block.shtml
Get YoWindow weather app for your phone or tablet.

Image Image Image
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Centre widget html

Post by ikarus1969 »

par wrote:Unfortunately <p align="center"> will not work in this case.

You need to wrap widget code inside the following <div> tag

Code: Select all

<div style="width:440px; margin-left: auto;  margin-right: auto;">  
</div>
This is a standard approach in CSS.
This article explains why.
http://www.thesitewizard.com/css/center-div-block.shtml
Thanks! :wink:
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
User avatar
hermanz
Posts: 1892
Joined: Thu Apr 08, 2010 3:21 pm
Name: Herman
Location: Nieuwegein, Netherlands

Re: Centre widget html

Post by hermanz »

Hi Pete

Here is the code in the zip file

succes
Herman :beer:
Attachments
yowindow_widget.zip
(1.01 KiB) Downloaded 431 times
(Wheather on an I(phone,pad,pod) or Android, YoWindow what else )
User avatar
PernicketyPete
Posts: 55
Joined: Sun Apr 29, 2012 3:45 pm
Name: Pete
Location: Chilthorne Domer, Somerset, UK
Contact:

Re: Centre widget html

Post by PernicketyPete »

Thanks Par & Everyone
That's it. I have it sorted.

Many thanks for all your help Pete.
Weather data suplied by Chilthorne Weather
Visit http://www.chilthorneweather.co.uk for live weather information from Chilthorne Domer, Somerset.
Post Reply