Put logo to the right : Logo « CSS Controls « HTML / CSS






Put logo to the right

 

<!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>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
#container {
  width:1020px;
  border:2px solid blue;
}
#logoouter {
  width:100%;
  text-align:right;
  position:absolute;
  left:0;
  top:10px;
  height:25px;
  min-width:800px;
  max-width:1024px;
}
#logo {
  width:100px;
  background:red;
  border:1px solid #000;
  height:25px;
  float:right;
}
#content {
  margin-top:40px;
}
</style>
</head>
<body>
    <div id="logoouter">
        <div id="logo">Logo</div>
    </div>
    <div id="container"> 
        <div id="content"> 
        <p>this is a test. this is a test. this is a test. this is a test. this is a test. 
        this is a test. this is a test. this is a test. this is a test. this is a test. 
        this is a test. this is a test. this is a test. this is a test. this is a test. </p>
        </div>
    </div>
</body>
</html>

 








Related examples in the same category