Solved

Absolute positionning and html flow

Posted on 1998-07-16
11
204 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
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…

867 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

21 Experts available now in Live!

Get 1:1 Help Now