473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

CSS doesn't do what I want in "strict" mode.

Take a look at these pages:

http://deimos.curious.be/~dusk/test/index.html
http://deimos.curious.be/~dusk/test/index2.html

They are the exact same code except for the doctype, which isn't
included in the index2.html file so it renders in "quirks" mode.

However, the way it renders in "quirks" mode is (almost) exactly how I
expected the page to render. I want the overflow scrollbar on the
"main" div (overflow set to auto) when the content becomes too large,
and I want the body to be 95% of the viewport (height set to 95%).

So what do I need to change in order to render the page as it renders
in "quirks" mode, but with the "strict" doctype?

Additional question: is this css layout ok to start with or will I run
into problems once I'll be adding content in the "main" div? I know
it's totally broken on IE due to the fixed elements, but I don't care
to much about that at the moment.

Greets
Tommy

Aug 4 '06 #1
2 1684
TomB wrote:
Take a look at these pages:

http://deimos.curious.be/~dusk/test/index.html
http://deimos.curious.be/~dusk/test/index2.html

They are the exact same code except for the doctype, which isn't
included in the index2.html file so it renders in "quirks" mode.

However, the way it renders in "quirks" mode is (almost) exactly how I
expected the page to render. I want the overflow scrollbar on the
"main" div (overflow set to auto) when the content becomes too large,
and I want the body to be 95% of the viewport (height set to 95%).

So what do I need to change in order to render the page as it renders
in "quirks" mode, but with the "strict" doctype?
html, body { height: 100% }

makes it fill the viewport, as it does for quirks mode.
(body does it for ie, html does it for everything else, iirc)

Chris
Aug 4 '06 #2

Chris Sharman schreef:
TomB wrote:
So what do I need to change in order to render the page as it renders
in "quirks" mode, but with the "strict" doctype?

html, body { height: 100% }

makes it fill the viewport, as it does for quirks mode.
(body does it for ie, html does it for everything else, iirc)

Chris
Ah, okay. That got me somewhere. I had to change some other stuff to
get this to work, but I'm very pleased with the result so far.

There's one thing that bugs me a little. With a browser window of
800*600 the footer text clips the viewport. I specified a margin of 2em
for the "foot" div, but it seems to be ignored for some reason. Any
hints?

Another problem is that with extreme small viewports the footer text
will clip the navigation div. I don't really care to much for that (are
there folks out there that go below let's say 500*500?) but if someone
knows a remedy I'd be glad to know :-)

Any comments on the overall look/feel?

TIA
Tommy

Aug 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ed | last post by:
Folks, I'm attempting to write some OOP with the use strict pragma on an I'm just not getting it to work. Here's an example #!/usr/bin/perl -w use strict; use Automobile; my $file = new...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
11
by: L. Chen | last post by:
The standard says that a char* or void* pointer has the least strict alignment. But I do not know what is a strict alignment. What does that mean?
1
by: Andy Crawford | last post by:
Even though I have set Strict Off, it is still on, thus causing this error. Here is the code in a templated Column of a DataGrid: (XPpro, Framework 1.1) <ItemTemplate> <TABLE width="100%">...
2
by: MichaelY | last post by:
Anyone figure out a workaround for setting the width on labels in 2.0??? I know width is no longer a valid property on inline text elements (per W3C), so what are the other options??? I have many...
3
by: ianakapilotlight | last post by:
We are in the process of moving from .net 1.1 to 2.0 and I dont seem to be able to resolve this problem. In VS2003 the Option Strict was swtiched on in the options menu and this was stored in a...
3
by: jdlwright | last post by:
Hi, I need to place a DIV exactly over a textarea element, but I can't calculate the correct value that I should set style.width to, because offsetWidth and style.width are calculated differently...
1
by: don.hosek | last post by:
Here's the relevant piece of code. <div style="position:relative;height:506;width:700; z-index:1; background-image:url(images/Mat-Tan.png);"> <div style="position:absolute;z-index:2; height:0;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.