Click to See Complete Forum and Search --> : How can I change css to make it look like in firefox


bogu
11-16-2006, 12:06 PM
If anyone has any idea and would like to share it is more then welcome.<?xml version="1.0" encoding="UTF-8"?>

<!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" xml:lang="en" lang="en">
<head>
<title>Title</title>
<style type="text/css">
#header {
position: fixed;
width: 100%;
height: 15%;
top: 0;
right: 0;
bottom: auto;
left: 0;
border:1px #ff0000 solid;
}
#sidebar {
position: fixed;
width: 10em;
height: auto;
top: 15%;
right: auto;
bottom: 100px;
left: 0;
border:1px #00ff00 solid;
}
#main {
position: fixed;
width: auto;
height: auto;
top: 15%;
right: 0;
bottom: 100px;
left: 10em;
border:1px #0000ff solid;
}
#footer {
position: fixed;
width: 100%;
height: 100px;
top: auto;
right: 0;
bottom: 0;
left: 0;
border:1px #008200 solid;
}
</style>
</head>
<body>
<div id="header"> Header </div>
<div id="sidebar"> Sidebar </div>
<div id="main"> Main </div>
<div id="footer"> Footer </div>
</body>
</html>This are the things that make me use tables instead of div's ...

Any tutorials, css examples are welcome, the script above is taken from w3.org, but the IE dont understand CSS 2 as firefox do ...

sneakyimp
11-25-2006, 04:53 PM
Not sure what your question is exactly?

bogu
11-26-2006, 08:08 AM
I cant create a css, like the one above so it will work in IE like it does in firefox, for any resolution ...

And I dont know why I create this topic, maybe because I try to this to work in both browser and I coundn't make it ...

It just drive me nuts ...

sneakyimp
11-26-2006, 04:36 PM
you could try changing your DOCTYPE declaration to STRICT?


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">


It probably won't make them exactly the same but in theory it is supposed to. WARNING: Your pages could look very different and height and width tags are interpreted as absolute, inflexible values. Strict rendering can be difficult.

On the other hand, trying to get Firefox and IE (and Safari and Opera and...) to all look the same with a single stylesheet can literally be impossible. You might try sniffing the USER AGENT in php and using different style sheets for the different browsers?

Weedpacket
11-26-2006, 05:53 PM
I tried tinkering with a few things; but then I realised that IE7 might do things differently from IE6. position:fixed (which is the *****y part) was what forced me into using a table in IE6, but it appears to work in IE7 (given the limited tinkering I did).

whisher06
11-26-2006, 05:55 PM
Hi.
You asked for some links here (http://www.pmob.co.uk/temp/3colfixedtest_4.htm)
;)
A lot of layouts ;)

Bye.


Edit
And here (http://cssplay.co.uk/layouts/index.html)