Solved

Absolute positionning and html flow

Posted on 1998-07-16
11
208 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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
 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

816 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

11 Experts available now in Live!

Get 1:1 Help Now