--- On Mon, 6/14/10, AD. <anton.l...@gmail.com> wrote: > From: AD. <anton.l...@gmail.com> > Subject: Re: GUIs - A Modest Proposal > To: python-list@python.org > Date: Monday, June 14, 2010, 7:51 PM > On Jun 14, 2:34 am, Stephen Hansen > <me+list/pyt...@ixokai.io> > wrote: > > HTML+CSS have some very strong advantages. Simplicity > is not one of > > them. Precision web design these days is a dark art. > (Go center an image > > vertically and horizontally in an arbitrary sized > field!) > > I agree, and I know that's a rhetorical question, but here > goes.... > > (I have no idea whether this works in IE though) > > <!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: 10px; > } > #one { > top: 50px; > width: 300px; > height: 300px; > } > #two { > top: 400px; > width: 200px; > height: 200px; > } > 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 id="one"><img src="image.jpg" > /></div> > <div id="two"><img src="image.jpg" > /></div> > </body> > </html> > > > -- > Cheers > Anton > -- > http://mail.python.org/mailman/listinfo/python-list >
But that is in a fixed size field, can you make the height change based on the height of the browser window, and still keep it centered? -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list