Jump to content

[css/html]problem with div layout


pawciak
 Share

Recommended Posts

I have sth like that:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="WebSite PRO 4.3" />  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />  <link rel="stylesheet" href="backup.css" type="text/css" />  <title>xro layout 002</title></head><body><div id="header"><img src="images/aukcje1_02.jpg" width="759" height="227" border="0" /></div><div id="menu">  <ul>  <li><img src="images/aukcje1_04.jpg" width="277" height="45" border="0" /></li>  <li><a href="#"><img src="images/aukcje1_05.jpg" width="72" height="45" border="0" /><li></a></li>  <li><a href="#"><img src="images/aukcje1_06.jpg" width="99" height="45" border="0" /><li></a></li>  <li><a href="#"><img src="images/aukcje1_07.jpg" width="156" height="45" border="0" /><li></a></li>  <li><a href="#"><img src="images/aukcje1_08.jpg" width="155" height="45" border="0" /><li></a></li>  </ul></div><div id="container">  <div id="centerwrapper">	<div id="center">	  <h2>Lorem ipsum sit ei sonet exerci feugait.</h2>	  <p>In vero antiopam has, cibo discere ne nec. Libris appellantur quo ad, et nec veritus tractatos. Sed suas molestiae mnesarchum ne, melius convenire ocurreret vix an. Feugiat ornatus expetendis mel te. Est timeam utroque ne, debet graecis feugait vel ut. Cu has utinam petentium theophrastus, et hinc dignissim duo. Ea ipsum suscipiantur vix.</p>	  <p>In vero antiopam has, cibo discere ne nec. Libris appellantur quo ad, et nec veritus tractatos. Sed suas molestiae mnesarchum ne, melius convenire ocurreret vix an. Feugiat ornatus expetendis mel te. Est timeam utroque ne, debet graecis feugait vel ut. Cu has utinam petentium theophrastus, et hinc dignissim duo. Ea ipsum suscipiantur vix.</p>	  <p>In vero antiopam has, cibo discere ne nec. Libris appellantur quo ad, et nec veritus tractatos. Sed suas molestiae mnesarchum ne, melius convenire ocurreret vix an. Feugiat ornatus expetendis mel te. Est timeam utroque ne, debet graecis feugait vel ut. Cu has utinam petentium theophrastus, et hinc dignissim duo. Ea ipsum suscipiantur vix.</p>	  <h2>Lorem ipsum sit ei sonet exerci feugait.</h2>	  <p>In vero antiopam has, cibo discere ne nec. Libris appellantur quo ad, et nec veritus tractatos. Sed suas molestiae mnesarchum ne, melius convenire ocurreret vix an. Feugiat ornatus expetendis mel te. Est timeam utroque ne, debet graecis feugait vel ut. Cu has utinam petentium theophrastus, et hinc dignissim duo. Ea ipsum suscipiantur vix.</p>	  <h2>Lorem ipsum sit ei sonet exerci feugait.</h2>	  <p>In vero antiopam has, cibo discere ne nec. Libris appellantur quo ad, et nec veritus tractatos. Sed suas molestiae mnesarchum ne, melius convenire ocurreret vix an. Feugiat ornatus expetendis mel te. Est timeam utroque ne, debet graecis feugait vel ut. Cu has utinam petentium theophrastus, et hinc dignissim duo. Ea ipsum suscipiantur vix.</p>	  <h2>Lorem ipsum sit ei sonet exerci feugait.</h2>	  <p>In vero antiopam has, cibo discere ne nec. Libris appellantur quo ad, et nec veritus tractatos. Sed suas molestiae mnesarchum ne, melius convenire ocurreret vix an. Feugiat ornatus expetendis mel te. Est timeam utroque ne, debet graecis feugait vel ut. Cu has utinam petentium theophrastus, et hinc dignissim duo. Ea ipsum suscipiantur vix.</p>	</div>  </div>  <div id="left">aA bB cC dD eE fF gG hH iI jJ kK lL</div></div><div id="footer">copyleft 2006 by xro</div></body></html>

and css

* {padding: 0;margin: 0;}html, body {  background: #fff;}body {  font-family: trebuchet ms, sans-serif;  font-size: 11px;  color: #000;}a {  text-decoration: none;}#header {  clear: both;  background: #ff7f1e;  padding: 0;  margin-left:auto;  margin-right:auto;  text-align:center;  width:759px;  height:227px;}#menu {  background: #86a43a;;  clear: both;  height: 56px;  width:759px;  overflow: hidden;  margin-left:auto;  margin-right:auto;  text-align:center;  padding: 0;}#menu ul {  list-style: none;}#menu li {  float: left;}#container {  clear: both;  height: 100%;  width:759px;  overflow: hidden;  margin-left:auto;  margin-right:auto;  text-align:center;}#centerwrapper{  float: left;  width:100%;}#center {  margin: 10px 0 -20000px 228px;  background: #fff;  padding: 0 10px 20000px 10px;}#center h2 {  font-size: 20px;  color: #0089af;  line-height: 100%;}#center p {  margin: 0 0 8px 0;  text-indent: 15px;  text-align: justify;}#left {  float: left;  width: 228px;  margin: 0 0 -20000px -100%;  background: #0089af;  padding: 0 0 20000px 0;}#footer {  background: #86a43a;  clear: both;  text-align: center;  margin-left:auto;  margin-right:auto;  height: 100%;  width:759px;  overflow: hidden;}

And the worst problem is that everything is OK in Firefox but IE has of course problems ( IE 6 ). As you see the blue left DIV is normally displayed in FF but it isnt working at all on IE - and I don't know why :| Christ IE is such a stupid browser :| i want to make a template for auctions - so I need to have a template which DIVS will fit to their content - You know what for?:) sorry if my prev post was hm.. messy. I want to have a web which will look the same - and doesnt matter how much text/images will be in one or other div ( I mean the middle div's :))it should looks like that:gifft0.gifGray div is a top of the site, green is a menubar, violet is just a color bar, and the blue bar is a footer.Red and Orange is for content.

Link to comment
Share on other sites

Two things that would make it more functional would be to change:background: #86a43a;to:background-color: #86a43a;and remove the:height: 100%and put in:width: 100%instead of:width:759px; ------I don't know if hat will do anything but clean the code, but it is a start.

Link to comment
Share on other sites

I see my mistake with LI - but I have question to You about doctype - which should I use if i want to use text/html ? I thought that HTML4 strict is a solution for my problem but it isnt true :| my web works fine only when I use -

<?xml version="1.0" encoding="iso-8859-2"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>

or only <HTML>. I want to have a vaild site but now i am confused :| what should I do ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...