Page 1 of 1

Stripes

Posted: Sun Dec 04, 2005 11:34 am
by Ree
Have a look at this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>

body, html
{
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body
{
  background-color: #F9F6EF;
  color: #000000;
}

#bottom-stripe-2
{
  background-color: #3C4982;
  height: 4px;
  line-height: 4px;
}

#bottom-stripe-3
{
  background-color: #7C8E98;
  height: 10px;
  line-height: 10px;
}

</style>
</head>
<body>
<div id="bottom-stripe-2">&nbsp;</div>
<div id="bottom-stripe-3">&nbsp;</div>
</body>
</html>
You can see that there is no space between the two divs. But IE still puts it there. How could I avoid this? I wouldn't want to use images/tables for this purpose...

Posted: Mon Dec 05, 2005 7:15 pm
by wtf
I believe DIV add's line break at the end of content wrapped withing DIV. <SPAN> is same as div without the line break .

Posted: Tue Dec 06, 2005 9:59 am
by pickle
There is a space - there's a carraige return (which sometimes IE displays on the page). Put your div declarations on the same line.