473,508 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

five divs

Ivo
Hello,

I have some pages which are close to pixel perfect in Win/IE6 in quircks
mode with text-size set to "smaller", but not at all on other systems. In
Mozilla clicking a link scrolls the page to the top before a second click
loads the link. On a Mac the page is only gray :-(.

What I am trying to achieve can be best described as four divs surrounding
the main content. In terms of z-indeces, the top is higher than the left is
higher than the bottom is higher than the right is higher than the top. All
divs should have their own independant scrollbar in case of overflow.

See
<URL: http://4umi.com/test.htm?doctype=no >
<URL: http://4umi.com/test.htm?doctype=401loose >
where styles can be tested interactively.

Does anyone have an idea to make this work cross-browser and
standards-compliant?
Thanks,
Ivo
Jul 20 '05 #1
6 1503
Tim
On Sat, 24 Jul 2004 18:24:19 +0200,
"Ivo" <no@thank.you> posted:
I have some pages which are close to pixel perfect in Win/IE6 in quirks
mode with text-size set to "smaller", but not at all on other systems.


Quick answer: You're trying to use a browser in *BROKEN* mode. This means
it's not playing by the rules, and neither are you. You cannot expect
anything else to play by the rules, either (emulating the broken behaviour
you're expecting from MSIE, or the proper rules about how it should be
done).

Solution: Try and get what you want working with IE *NOT* in quirks mode,
and using strict HTML, then you'll have more luck.

There's far too much on those pages for many of us to want to try and
decrypt what you're doing or trying to do, certainly not to do that for
free. Start running your source through error checkers and validators
like: <http://validator.w3.org/> & <http://jigsaw.w3.org/css-validator/>,
and fix up the problems it finds. Once you get rid of ALL of them, you
stand more chance of acheiving what you're after.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #2
Ivo
"Tim" wrote
"Ivo" <no@thank.you> posted:
I have some pages which are close to pixel perfect in Win/IE6 in quirks
mode with text-size set to "smaller", but not at all on other systems.
Quick answer: You're trying to use a browser in *BROKEN* mode. This

means it's not playing by the rules, and neither are you. You cannot expect
anything else to play by the rules, either (emulating the broken behaviour
you're expecting from MSIE, or the proper rules about how it should be
done).

Solution: Try and get what you want working with IE *NOT* in quirks mode,
and using strict HTML, then you'll have more luck.


Well thanks. This is exactly what I am doing.
Here are the results:
<URL: http://4umi.com/test.htm?doctype=401loose >
This Page Is Valid HTML 4.01 Transitional!
<URL: http://4umi.com/test.htm?doctype=401strict >
This Page Is Valid HTML 4.01 Strict!

But the margins, borders, scrollbars etc. are all in the wrong places. Only
in broken mode do they behave the way I want. I know about the different box
models but only the old version seems to make sense.
Thanks,
Ivo

Jul 20 '05 #3
Tim
Tim wrote:
Solution: Try and get what you want working with IE *NOT* in quirks mode,
and using strict HTML, then you'll have more luck.

"Ivo" <no@thank.you> posted:
Well thanks. This is exactly what I am doing.
Here are the results:
<URL: http://4umi.com/test.htm?doctype=401loose >
This Page Is Valid HTML 4.01 Transitional!
<URL: http://4umi.com/test.htm?doctype=401strict >
This Page Is Valid HTML 4.01 Strict!

But the margins, borders, scrollbars etc. are all in the wrong places. Only
in broken mode do they behave the way I want. I know about the different box
models but only the old version seems to make sense.


I really can't see what you're trying to do, the examples are too obscure.
And I'm sure I'm not the only one (I don't see a plethora of other replies,
or any at all). Trying your pages in a Mozilla based browser just looks
plain weird, MSIE no better. We can't see what you're trying to do, we
can't see your browser, stick a screenshot somewhere.

And we can't know what's in your mind, a better description is needed.
Your original one didn't really make a great deal of sense to me. Maybe
some of your problems are to do with the scripting you've used. I don't do
scripting. Remember that "pixel perfection" is an impossible goal with
HTML, and even attempting it can cause more problems than you'll forsee.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #4
Ivo
"Tim" wrote
Tim wrote:

We can't see what you're trying to do, we
can't see your browser, stick a screenshot somewhere.
URL of a pixelperfect screenshot:
< http://4umi.com/web/css/ccstest.jpg >
Testpage again:
< http://4umi.com/test.htm >
And we can't know what's in your mind, a better description is needed.
Your original one didn't really make a great deal of sense to me. Maybe
some of your problems are to do with the scripting you've used. I don't do scripting. Remember that "pixel perfection" is an impossible goal with
HTML, and even attempting it can cause more problems than you'll forsee.


I know, and that is why I was so surprised at first when (in IE quirks mode)
it just did exactly what I had in mind. That led me to believe it shouldn't
be too difficult in other modes and browsers too...

Another attempt at a description:
A main content area, with its own scrollbar, surrounded by a top bar, a
footer bar, and side panes left and right. The right pane should start at
the top (go 'over' the top bar) and the left pane should start below the top
bar but go all the way to the bottom (go 'over' the bottom bar).
In ASCII art:
+-------------+
|----------| |
| | | |
| | | |
| | | |
| |----------|
+-------------+

For example in IE quirks mode, the main area has a scrollbar against the
side of the right pane, where one would expect it, but in standards mode it
is hidden behind the right pane and I can't get it back in place.
Any help would be much appreciated,
Ivo
Jul 20 '05 #5
"Ivo" <no@thank.you> wrote
A main content area, with its own scrollbar, surrounded by a top bar, a
footer bar, and side panes left and right. The right pane should start at
the top (go 'over' the top bar) and the left pane should start below the
topbar but go all the way to the bottom (go 'over' the bottom bar).
In ASCII art:
+-------------+
|----------| |
| | | |
| | | |
| | | |
| |----------|
+-------------+


What you want is not possible with CSS. The fact that IE quirks does it
nevertheless means nothing ;-) These mutual interdependencies you describe
are still only possible with tables:

<table>
<tr>
<td colspan="2"> Top </td>
<td rowspan="2"> Right </td>
</tr>
<tr>
<td rowspan="2"> Left </td>
<td> Centre </td>
</tr>
<tr>
<td colspan="2"> Bottom </td>
</tr>
</table>

It does make you wonder about the limits of CSS as a language.
--
Alec


Jul 20 '05 #6
On Wed, 28 Jul 2004 01:24:35 +0200, "Alec Nasher" <an@example.com>
wrote:
"Ivo" <no@thank.you> wrote
+-------------+
|----------| |
| | | |
| | | |
| | | |
| |----------|
+-------------+
What you want is not possible with CSS.

[snip]It does make you wonder about the limits of CSS as a language.


Really?

<html>
<head>
<title>A Wacky Layout</title>
<style type="text/css">
body {
background: #000000;
color: #ffffff;
}
#main {
background: #ffffff;
color: #000000;
position: absolute;
top: 10%;
left: 10%;
width: 80%;
height: 80%;
overflow: scroll;
}
#top, #left, #bottom, #right {
background: #000000;
color: #ffffff;
position: absolute;
}
#top, #bottom {
width: 90%;
height: 10%;
}
#left, #right {
width: 10%;
height: 90%;
}
#top {
top: 0;
left: 0;
}
#bottom {
bottom: 0;
right: 0;
}
#left {
left: 0;
top: 10%;
}
#right {
right: 0;
top: 0;
}
</style>
</head>
<body>
<div id="top">
<h1>A Wacky Layout</h1>
</div>
<div id="main">
<p>Blah blah blah</p>
</div>
<div id="left">
<ul>
<li>About</li>
<li>Products</li>
<li>Contact</li>
</ul>
</div>
<div id="right">
<p>Find out more about xyz at pqr.</p>
</div>
<div id="bottom">
<address>This page is maintained by Joe Shmoe.</address>
</div>
</body>
</html>
There's a start. It needs work to make it pretty, and I skipped a few
good practices to make this overly-long example a bit shorter, but it
certainly creates the layout the original poster wanted in Opera,
Mozilla and Internet Explorer for Windows.

Also, if I click the "Author/User Mode Toggle" button in Opera, the
page becomes a nice, sensible, linear document, helped by the order
the different sections appear in the markup.

The question remains, of course, why you'd want a layout like this in
the first place. I'm sure the original poster has his reasons, though.
:)

All the best,
-Claire

Note: the above code contains the minimum necessary to accompany my
point. It's not intended to be a general example of recommended
HTML/CSS practices.
Jul 20 '05 #7

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

Similar topics

15
13480
by: red | last post by:
How do I center two side by side divs ? I've been writing css pages for a while but there's one thing tha still eludes me. I can center a div with margin auto. I can place two divs side by side...
39
3562
by: WindAndWaves | last post by:
Hi Gurus I have a page, which looks a bit like this: .... <body> <div ID=id1>................</DIV> <div ID=gsd>................</DIV> <div ID=ewd>................</DIV> <div...
12
2795
by: meltedown | last post by:
I would like the floating divs to float and then the header to come after them , on the left. That's what I thought clearing the floats was for, but in this example, the header is to the right of...
2
8245
by: tasman.hayes | last post by:
I'm experimenting with converting a site from a table layout to CSS. I'm floating three DIVs in a row for the top of a website (a logo, navigation buttons and a email list signup box). The DIVs...
0
7231
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
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
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
7504
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...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.