Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 1st, 2005, 10:38 AM
Registered User
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to simrud
Default 3 Row Layout

I'm trying to get out of using tables, and being new to layouts completely based on CSS I'm having a lot of trouble with this particular design.

All I'm trying to do is have a header area about 100px high and spanning the width of the page no matter how wide it is, with a centered content. Kind of like a frame really.

Then I'm trying to have a footer about 28px high on the bottom, once again fixed there like a frame and spanning the width of the page with centered content.

In between the content needs to go.

The issue I'm having is that Explorer just doesn’t want to render anything I tired correctly, while every other browser out there seems to be just fine.

It is important for me that only the middle scrolls, and that you can see the entire scrollbar at any moment, including the very top and the very bottom. I have gotten it to work w/out showing the full scroll bar, but the code is really messy and is driving me insane.

Has anybody done something like this before, or do they know a website that has this layout implemented in a flexible way?

Thanks in advance for your help.


 
Old August 1st, 2005, 10:46 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Link to the code would be nice.

I assume you're using fixed positioning.

Try out Dean Edwards' IE7 JavaScript, which implements fixed positioning in Explorer among other things.

http://dean.edwards.name/ie7

Get the source from SourceForge
https://sourceforge.net/project/show...roup_id=109983

Place the files in the root directory of your web server. e.g. http://www.example.com/ie7

Then add these lines between the <head> and </head> tags.
Code:
<!--[if lt IE 7]>
<script src="/ie7/ie7-standard-p.js" type="text/javascript"></script>
<![endif]-->
Now you have a CSS2 capable Explorer via JavaScript. See Dean's website for other things that it supports.

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old August 1st, 2005, 03:28 PM
Registered User
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to simrud
Default

Thanks for the super fast reply, I would have posted the link, but I have not even gone out and got a domain name for this, yet. Just playing around with CSS, actually picked your book up and came across the forum thing in the beginning. Nice book by the way, def. worth the reasonable price, a nice break from the 50 bucks a bloated book from the how I can stretch out this computer book so it turns into a really bad reference manual text series lol.

That’s pretty awesome that you could just get a patch up on the server to make IE manageable. I was seriously considering laying off CSS to position stuff solely with it because IE 7 doesn’t come out for like another 2 years.

Once again thanks a lot for the help.

 
Old August 1st, 2005, 06:47 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

No problem, glad to help out!

Just a head's up. Be careful of where you place your fixed positioned elements in Explorer. Fixed positioning is supposed to happen relative to the viewport, which makes fixed positioning an ideal replacement for frames. Technically speaking it shouldn't matter where a fixed position element appears in a document, because positioning is always supposed to be relative to the viewport. This doesn't actually work out so well in the real world. The reality is the best place to place these is between the <body> and </body> tags- not nested within any other elements. Dean's script is a hack, it just applies absolute positioning when it detects the presence of the position: fixed; declaration, and updates the position dynamically via javascript onscroll events. It becomes unpredictable and buggy when applying positiong: fixed; to an element nested with others. I had to figure this out the hard way, so I thought I'd pass that along.

IE7 is pretty amazing. Goes to show that even with a four year old, outdated browser, you can still make use of the latest standards- with the right JavaScript.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design





Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar in row of Datagrid Except Header Row Theone84 ASP.NET 2.0 Professional 0 August 11th, 2008 12:10 AM
To retrieve a row by giving row number prad_a MySQL 1 March 22nd, 2007 11:20 PM
Read a column and Search Row by Row in another col AyatKh Excel VBA 2 January 26th, 2005 12:02 PM
layout adflynn Java GUI 0 November 9th, 2004 06:33 AM
Manage data row by row in datagrid Dragonist Classic ASP Databases 5 July 29th, 2004 04:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.