473,466 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

One Last Question (For Now)

According to the CSS guide at http://www.westciv.com/, absolute positioning
"...lets a developer say where the top left hand corner of an element
should be located with respect to its parent element."

If that's so, it seems like this layout should work:

http://development2.holotech.net/absolute.html

Columns 2 and 3 are in a wrapper with columns 1 and 4 floated alongside it.
They should be positioned relative to that wrapper, but they are positioned
relative to the page. Why is that?

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 20 '05 #1
5 1678
Alan Little <al**@n-o-s-p-a-m-phorm.com> wrote in
news:Xn**************************@216.196.97.132:
According to the CSS guide at http://www.westciv.com/, absolute
positioning "...lets a developer say where the top left hand corner of
an element should be located with respect to its parent element."

If that's so, it seems like this layout should work:

http://development2.holotech.net/absolute.html

Columns 2 and 3 are in a wrapper with columns 1 and 4 floated
alongside it. They should be positioned relative to that wrapper, but
they are positioned relative to the page. Why is that?


Because "with respect to its parent element" isn't quite right. It really
should be "with respect to its closest non-statically positioned ancestor
element, or the entire viewport if there isn't a positioned ancestor
element."

Just set "position: relative" (without specifying any offsets) for the
wrapper. That will make it the "containing block" for your columns.

Jul 20 '05 #2
Carved in mystic runes upon the very living rock, the last words of Eric
Bohlman of comp.infosystems.www.authoring.stylesheets make plain:
Alan Little <al**@n-o-s-p-a-m-phorm.com> wrote in
news:Xn**************************@216.196.97.132:
According to the CSS guide at http://www.westciv.com/, absolute
positioning "...lets a developer say where the top left hand corner
of an element should be located with respect to its parent element."

If that's so, it seems like this layout should work:

http://development2.holotech.net/absolute.html

Columns 2 and 3 are in a wrapper with columns 1 and 4 floated
alongside it. They should be positioned relative to that wrapper,
but they are positioned relative to the page. Why is that?


Because "with respect to its parent element" isn't quite right. It
really should be "with respect to its closest non-statically
positioned ancestor element, or the entire viewport if there isn't a
positioned ancestor element."

Just set "position: relative" (without specifying any offsets) for the
wrapper. That will make it the "containing block" for your columns.


That's good to know. Unfortunately, while Opera and IE agree with you, NS
steadfastly and gleefully insists you're full of it.

I'm debating the wisdom of really expanding into design. When I write a
line of PHP code, I don't have to worry or wonder about anyone's
opinions, bright ideas, implementation, blah blah blah. If I write it
properly, it does what it's supposed to. Actually, there are a few cross-
platform issues to consider if I need my code to be portable (which is
not usually the case), but it's nothing like this mish-mash of esoterica.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 20 '05 #3
Carved in mystic runes upon the very living rock, the last words of Alan
Little of comp.infosystems.www.authoring.stylesheets make plain:
Carved in mystic runes upon the very living rock, the last words of
Eric Bohlman of comp.infosystems.www.authoring.stylesheets make plain:
Alan Little <al**@n-o-s-p-a-m-phorm.com> wrote in
news:Xn**************************@216.196.97.132:
According to the CSS guide at http://www.westciv.com/, absolute
positioning "...lets a developer say where the top left hand corner
of an element should be located with respect to its parent element."

If that's so, it seems like this layout should work:

http://development2.holotech.net/absolute.html

Columns 2 and 3 are in a wrapper with columns 1 and 4 floated
alongside it. They should be positioned relative to that wrapper,
but they are positioned relative to the page. Why is that?


Because "with respect to its parent element" isn't quite right. It
really should be "with respect to its closest non-statically
positioned ancestor element, or the entire viewport if there isn't a
positioned ancestor element."

Just set "position: relative" (without specifying any offsets) for
the wrapper. That will make it the "containing block" for your
columns.


That's good to know. Unfortunately, while Opera and IE agree with you,
NS steadfastly and gleefully insists you're full of it.


But wait!

And it came to pass that as Alan of Holotech didst languish in the Slough
of CSS Despond, a voice as of an angel didst speak unto him, saying,
"Thus sayeth Eric of Bohlman, that if thou might make thine wrapper non-
static, thine child elements shall thus conform to the positioning
thereof. Verily, he speaketh sooth. But NS in its iniquity spiteth thee,
saying, 'Forsooth, what then shall be the position of the wrapper? I wist
not what sayeth IE, nor even Opera; verily thou must shew it to me.'"
Then didst the light of truth shine forth and the voice as of the angel
didst proclaim, "Surely, thine wrapper must have an position!
Absolutely!" Thus did ALAN know that here was salvation from the
obstinance of NS:

http://development2.holotech.net/absabs.html

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 20 '05 #4
Carved in mystic runes upon the very living rock, the last words of Alan
Little of comp.infosystems.www.authoring.stylesheets make plain:
http://development2.holotech.net/absabs.html


Gahhhh! But then the footer doesn't float! ::sigh:: Screw it.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 20 '05 #5
Alan Little wrote:
http://development2.holotech.net/absabs.html


Gahhhh! But then the footer doesn't float! ::sigh:: Screw it.


The footer doesn't "float" like you expect because columns 2 and 3 are
absolutely positioned, so they have no effect on the footer placement.
I don't know whay you have the columns ordered the way you do in the
HTML, but if you float all 4 columns, clear:both will place the footer
below the longest column. Something like:

..col { width:25%; float:left; }
#footer { clear:both; }

with

<div id="header">header</div>
<div class="col">one</div>
<div class="col">two</div>
<div class="col">three</div>
<div class="col">four</div>
<div id="footer">footer</div>

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #6

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

Similar topics

57
by: pinkfloydhomer | last post by:
Isn't there an easier way than lst = ... ?
20
by: Guru | last post by:
Hi I have a table which contains number of rows. I want to fetch the last 5 records from the table. I know for the first 'n' records we can use FETCH FIRST n ROWS ONLY command. But i want to...
1
by: Anita C | last post by:
Hi, How cookies can be used to set and then determine the last page visited by a person browsing a particular website ? Also the page last visited is loaded in an iframe, so the page last visited...
5
by: PAPutzback | last post by:
txtToDate.Text = (Now.Date.AddDays(-(Now.Day)).AddMonths(1))
6
by: SQLcat | last post by:
I have a VBScript as follows: Dim xmlHTTP : Set xmlHTTP = CreateObject("Microsoft.XMLHTTP") Dim adoStream : Set adoStream = CreateObject("adodb.stream") Const bGetAsAsync = False ' wait for...
6
by: magix | last post by:
Hi, when I read entries in file i.e text file, how can I determine the first line and the last line ? I know the first line of entry can be filtered using counter, but how about the last line...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
0
by: marlberg | last post by:
Platform: Windows2000, WindowsXP, Windows Vista, etc Language: C#, ASP.NET Pre-compiled Libraries: Enterprise Library 3.0 full I have a requirement to implement in and display in C# and...
12
by: foolsmart2005 | last post by:
There are 10 webpages on the host, e.g. 001.html, 002.html, 003,html, 004.html, ......010.html I want to check whether the page is the last page. How can I do. In the index.html -Go to last...
3
by: Mike P | last post by:
How would I check a datetime variable is within the last 7 days? *** Sent via Developersdex http://www.developersdex.com ***
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.