Skip to content

Instantly share code, notes, and snippets.

@superlou
Created July 17, 2011 16:15
Show Gist options
  • Save superlou/1087737 to your computer and use it in GitHub Desktop.
Save superlou/1087737 to your computer and use it in GitHub Desktop.
Centering
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<style type="text/css">
#flag { url(images/heartseedLightImage2.jpg) no-repeat }
#green { background:green; display:block; float: left; width: 100px }
#white { background:yellow; display:block; float: left; width: 100px }
#red { background:red; display:block; float: left; width: 100px }
#flag {
float:left;
width:225px;
height:375px;
margin: 0px auto;
width: 70%;
}
#container {
width: 100%;
padding-top: 100px;
}
</style>
</head>
<body>
<div id="container">
<div id="flag">
<div id="green">test
</div>
<div id="white">test
</div>
<div id="red">test
</div>
</div>
</div>
</body>
</html>
@superlou
Copy link
Author

<style type="text/css"> #flag { url(images/heartseedLightImage2.jpg) no-repeat } #green { background:green; display:block; float: left; width: 100px } #white { background:yellow; display:block; float: left; width: 100px } #red { background:red; display:block; float: left; width: 100px } #flag { width:225px; height:375px; margin: 0px auto; width: 70%; } #container { width: 100%; padding-top: 100px; } </style>
test
test
test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment