# \[CSS\] Simulating Gmail

**URL:** https://forum.kirupa.com/t/css-simulating-gmail/253536
**Category:** web dev
**Created:** [March 2, 2008, 6:56pm UTC](https://forum.kirupa.com/t/css-simulating-gmail/253536 "2008-03-02T18:56:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)
#### Post date: [March 2, 2008, 6:56pm UTC](https://forum.kirupa.com/t/css-simulating-gmail/253536/1 "2008-03-02T18:56:01Z")

</div>

I want to simulate Gmail’s CSS:

![](http://forum.kirupa.com/uploads/kirupa/4355/0866503608ee5db7.gif)

[LIST]  
[_]people list always on the left  
[_]date/time always on the right  
[\*]Message preview is as long as the user’s browser. It will shrink when the browser shrinks.  
[/LIST]

So I attempted to do this:

```php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">

	.email {
		background: #99CCFF;
		height: 1.2em;
	}
	
	.date {
		background: #FFFFCC;
		float: right;
	}
	
	.people {
		background: #99CCCC;
		float: left;
	}
	
	.message {
		background: #FFCCFF;
		float: left;
	}
	
</style>
</head>

<body>

	<div class="email">
		<div class="people">
			John, Rob, Jennifer
		</div>
		<div class="message">
			This message is supposed to shrink with the browser.
		</div>
		<div class="date">
			4:15 pm 12/05/07
		</div>
	</div>

</body>
</html>

```

When the browser is wide enough, it looks ok:

![](http://img223.imageshack.us/img223/4757/54920858eq6.gif)

But it fails when the browser is shrunk:

![](http://forum.kirupa.com/uploads/kirupa/4356/b36235eb8b573f86.gif)

Any ideas?
