GUIs - A Modest Proposal
AD.
anton.list at gmail.com
Mon Jun 14 19:51:42 EDT 2010
On Jun 14, 2:34 am, Stephen Hansen <me+list/pyt... at 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
More information about the Python-list
mailing list