Solved

Absolute positionning and html flow

Posted on 1998-07-16
11
200 Views
Last Modified: 2010-08-05
What I would do:
I want generate an HTML file who must produce a page with an header, a body and a footer.
In each part, elements are positionned with Absolute positionning of the CSS.
Each element (text box, table....) has styles defined with the CSS.
I don't want use the frames
It can be read with Netscape & Explorer
What I know:
Height of header and footer (but not body's height)
width of each part = 100 %
elements to define different styles (and of course their coordonates)
0
Comment
Question by:rafounet
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1844653
Using the stylesheets, you can create each element (Header, Footer, etc...) as <DIV> elements... you can then choose where they are placed... example:

<DIV ID="Header" STYLE="position:absolute; top:0;">
Header info here...
</DIV>
<DIV ID="Body" STYLE="position:relative; top;10;">
the "top:10" above places this "DIV" 10 pixels below the Header DIV.
Body stuff here...
</DIV>
<DIV ID="Footer" STYLE="position:relative; top:10;">
Footer info...
</DIV>

The heights of the header and footers are not important nor is the body height.. This example will work no matter the height... However, from my experience, these work noly in Internet explorer and Netscape 4.x browsers.. I am not sure how well Cascading Style Sheets are implemented in 3.x browsers...

- Matt
0
 

Author Comment

by:rafounet
ID: 1844654
Hi Matt,
Thanks for your response but it's not acceptable for these reasons:
1st: The 2 DIV in Relative position are placed in the page relatively of the top left of the document because the Header is defined in absolute. In fact, when you define parts in absolute position, it doesn't enter in the HTML Flow. So you have the header on the top left (absolute in top 0) and the other div (resp. body & footer) at resp. 10 & 20 of the top left of the document and not of the bottom of the header.
2nd: I have to place Items in differents parts (header, body, footer) in absolute position from the top left of this part and not from the top left of the document...
Note: I'm using IE4.72 & Netscape 4.05.




0
 

Author Comment

by:rafounet
ID: 1844655
The problem is that Items with CSSP "position:absolute;" are not in the HTML flow.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1844656
The first "position:absolute: is in the flow... It acts as an" anchor on which the rest of the layers "attach"  I have an intranet design @ general Electric that uses CSS and does exactly what you are saying... Use it if you waqnt... if not, oh well

0
 
LVL 8

Expert Comment

by:jbirk
ID: 1844657
Why don;t you want to use frames?  They sound like the ideal situation for what you are asking?  I don't think there are very many people left who have browsers which don't support frames, and CSS is HTML 4 anyway, so it's only available in 4.0 browsers.

-Josh
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Expert Comment

by:gmoriak
ID: 1844658
Use frames, both browsers being used support them and they do exactly what you want.  Why wouldn't you use them?
0
 

Author Comment

by:rafounet
ID: 1844659
I can't use frame for conforming at graphic chart !!!
0
 

Author Comment

by:rafounet
ID: 1844660
Same response as jbirk's
0
 
LVL 8

Expert Comment

by:jbirk
ID: 1844661
Maybe you could provide a url, so we could see the problem first hand, and suggest a good way to get it working.
-Josh
0
 
LVL 1

Accepted Solution

by:
Patricia080698 earned 150 total points
ID: 1844662
The best suggestion that I can give you is using tables. If you know how to use tables (tr, td, rowspan and colspan) than you can defenitely arrange your pages as you want. And the best thing is that it will work in Netscape AND Explorer, they are also flexible enough, so when you change your screen resolution the pages (or tables) will be arranged automatically. Hope that helps.
0
 

Author Comment

by:rafounet
ID: 1844663
Hye Patricia,
Your answer can't work for me because my real problem is to mix Html flow positionning and absolute positionning.
I close this question because I think there is no acceptable way for this problem with the constraints I have ...
Thanks at all ...(Matt, Josh, GMoriak and Patricia)...

Raf.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now