HighDots Forums  

One Last Question (For Now)

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss One Last Question (For Now) in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alan Little
 
Posts: n/a

Default One Last Question (For Now) - 12-06-2003 , 03:35 PM






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/

Reply With Quote
  #2  
Old   
Eric Bohlman
 
Posts: n/a

Default Re: One Last Question (For Now) - 12-06-2003 , 03:45 PM






Alan Little <alan (AT) n-o-s-p-a-m-phorm (DOT) com> wrote in
news:Xns9449A8B277E45alanphormcom (AT) 216 (DOT) 196.97.132:

Quote:
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.



Reply With Quote
  #3  
Old   
Alan Little
 
Posts: n/a

Default Re: One Last Question (For Now) - 12-06-2003 , 05:19 PM



Carved in mystic runes upon the very living rock, the last words of Eric
Bohlman of comp.infosystems.www.authoring.stylesheets make plain:

Quote:
Alan Little <alan (AT) n-o-s-p-a-m-phorm (DOT) com> wrote in
news:Xns9449A8B277E45alanphormcom (AT) 216 (DOT) 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/


Reply With Quote
  #4  
Old   
Alan Little
 
Posts: n/a

Default Re: One Last Question (For Now) - 12-06-2003 , 05:38 PM



Carved in mystic runes upon the very living rock, the last words of Alan
Little of comp.infosystems.www.authoring.stylesheets make plain:

Quote:
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 <alan (AT) n-o-s-p-a-m-phorm (DOT) com> wrote in
news:Xns9449A8B277E45alanphormcom (AT) 216 (DOT) 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/


Reply With Quote
  #5  
Old   
Alan Little
 
Posts: n/a

Default Re: One Last Question (For Now) - 12-06-2003 , 05:40 PM



Carved in mystic runes upon the very living rock, the last words of Alan
Little of comp.infosystems.www.authoring.stylesheets make plain:

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

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/


Reply With Quote
  #6  
Old   
kchayka
 
Posts: n/a

Default Re: One Last Question (For Now) - 12-08-2003 , 07:28 AM



Alan Little wrote:
Quote:
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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.