GUIs - A Modest Proposal

Ed Keith e_d_k at yahoo.com
Mon Jun 14 21:03:18 EDT 2010


Nice! I've been looking for that trick for some time.

Thank you,

   -EdK

Ed Keith
e_d_k at yahoo.com

Blog: edkeith.blogspot.com


--- On Mon, 6/14/10, AD. <anton.list at gmail.com> wrote:

> From: AD. <anton.list at gmail.com>
> Subject: Re: GUIs - A Modest Proposal
> To: python-list at python.org
> Date: Monday, June 14, 2010, 8:56 PM
> On Jun 15, 11:59 am, Ed Keith <e_... at yahoo.com>
> wrote:
> > But that is in a fixed size field,
> 
> That's why I used the same image definition in two
> different sized
> divs to show that the images position wasn't determined by
> the divs
> size.
> 
> > can you make the height change based on the height of
> the browser window, and still keep it centered?
> 
> Like this? The div is sized according to the browser window
> and
> centered. The image is a fixed size, but still centered
> within the
> div.
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "DTD/xhtml1-
> strict.dtd">
> <html>
> <head>
> <style>
> 
> div {
>     position: absolute;
>     border: 1px solid blue;
>     margin: auto;
>     top: 10%;
>     bottom: 10%;
>     left: 10%;
>     right: 10%;
>     }
> 
> img {
>     position: absolute;
>     width:100px;
>     height: 100px;
>     margin: auto;
>     top: 0;
>     bottom: 0;
>     left: 0;
>     right: 0;
>     border: 1px solid red;
>     }
> 
> </style>
> </head>
> <body>
> 
> <div>
> <img src="image1.jpg" />
> </div>
> 
> </body>
> </html>
> 
> --
> Cheers
> Anton
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


      



More information about the Python-list mailing list