HighDots Forums  

Page end with absolute divs.

alt.html alt.html


Discuss Page end with absolute divs. in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ian Shortman
 
Posts: n/a

Default Page end with absolute divs. - 07-03-2006 , 05:12 PM






I have a div called 'utility' with produces an absolute positioned
sidebar on my website. However, if the content is shorter than the
length of this sidebar - it overhangs the footer. By this I mean the
long length seems to not shift where the end of the content is
interpretted at. (An example can be seen on my site:
http://brokenbulb.co.uk/blog/1). I have tried to enclose this absolute
div within an relitive div content wrap ('wrap') - however this seems
to have had no effect. I have also added the clear tag to a blank div
below all the content (<div style="clear:both;"></div>), and this also
seems to have failed to work. Any ideas?

Thanks in advance.


Reply With Quote
  #2  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Page end with absolute divs. - 07-03-2006 , 07:22 PM






Ian Shortman wrote:
Quote:
I have a div called 'utility' with produces an absolute positioned
sidebar on my website. However, if the content is shorter than the
length of this sidebar - it overhangs the footer. By this I mean the
long length seems to not shift where the end of the content is
interpretted at. (An example can be seen on my site:
http://brokenbulb.co.uk/blog/1). I have tried to enclose this absolute
div within an relitive div content wrap ('wrap') - however this seems
to have had no effect.
Of course it wouldn't, absolute positioned elements are not flowed with
the page, See:

http://www.w3.org/TR/CSS21/visuren.h...te-positioning

I have also added the clear tag to a blank div
Quote:
below all the content (<div style="clear:both;"></div>), and this also
seems to have failed to work.
Clear works with floats not absolute positioning. Float left your
sidebar then clear left on your footer would achieve what your desire.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #3  
Old   
Ian Shortman
 
Posts: n/a

Default Re: Page end with absolute divs. - 07-04-2006 , 06:53 AM



Yes - but when I do that the sidebar ends up below the content:

Header - FooBar
Content
Foo
Bar
Baz
Sidebar
All the
way
down
here

Jonathan N. Little wrote:
Quote:
Ian Shortman wrote:
I have a div called 'utility' with produces an absolute positioned
sidebar on my website. However, if the content is shorter than the
length of this sidebar - it overhangs the footer. By this I mean the
long length seems to not shift where the end of the content is
interpretted at. (An example can be seen on my site:
http://brokenbulb.co.uk/blog/1). I have tried to enclose this absolute
div within an relitive div content wrap ('wrap') - however this seems
to have had no effect.

Of course it wouldn't, absolute positioned elements are not flowed with
the page, See:

http://www.w3.org/TR/CSS21/visuren.h...te-positioning

I have also added the clear tag to a blank div
below all the content (<div style="clear:both;"></div>), and this also
seems to have failed to work.

Clear works with floats not absolute positioning. Float left your
sidebar then clear left on your footer would achieve what your desire.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Page end with absolute divs. - 07-04-2006 , 08:16 AM



Ian Shortman wrote:
Quote:
Yes - but when I do that the sidebar ends up below the content:

Header - FooBar
Content
Foo
Bar
Baz
Sidebar
All the
way
down
here

Well A URL would certainly be preferable that playing 20 question, but I
bet you problem beside not understanding how foal work is that your
floated element is too far down within the markup. It needs to be before
the content block

<div>Header</div>
<div style="float: left; width: 20%">Side Bar</div>
<div>Content...Lorem ipsum dolor sit amet...</div>
<div style="clear: left">Footer</div>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #5  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Page end with absolute divs. - 07-04-2006 , 09:41 AM



Jonathan N. Little wrote:

Quote:
Ian Shortman wrote:
Yes - but when I do that the sidebar ends up below the content:

Header - FooBar
Content
Foo
Bar
Baz
Sidebar
All the
way
down
here

Well A URL would certainly be preferable that playing 20 question, but
I bet you problem beside not understanding how foal work is that your
floated element is too far down within the markup. It needs to be
before the content block
Not necessarily. ;-)
http://countryrode.com/

--
-bts
-Warning: I brake for lawn deer


Reply With Quote
  #6  
Old   
Ian Shortman
 
Posts: n/a

Default Re: Page end with absolute divs. - 07-04-2006 , 02:37 PM



Ive got it working how I want now (see that URL again), but the only
way it seemed to work was if I put the sidebar above the content (as it
seems you now referenced) in the markup, however this isn't so good for
text-only browsers (and unfortunately a fair few people use 'links' for
my site) so is there a way to change this?

Thanks

Beauregard T. Shagnasty wrote:
Quote:
Jonathan N. Little wrote:

Ian Shortman wrote:
Yes - but when I do that the sidebar ends up below the content:

Header - FooBar
Content
Foo
Bar
Baz
Sidebar
All the
way
down
here

Well A URL would certainly be preferable that playing 20 question, but
I bet you problem beside not understanding how foal work is that your
floated element is too far down within the markup. It needs to be
before the content block

Not necessarily. ;-)
http://countryrode.com/

--
-bts
-Warning: I brake for lawn deer


Reply With Quote
  #7  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Page end with absolute divs. - 07-04-2006 , 07:22 PM



Ian Shortman wrote:
Quote:
Ive got it working how I want now (see that URL again), but the only
way it seemed to work was if I put the sidebar above the content (as it
seems you now referenced) in the markup, however this isn't so good for
text-only browsers (and unfortunately a fair few people use 'links' for
my site) so is there a way to change this?

Thanks

Beauregard T. Shagnasty wrote:
Jonathan N. Little wrote:

Ian Shortman wrote:
Yes - but when I do that the sidebar ends up below the content:

See how messed up this looks ^^^^^
Please don't top post....

Quote:
Header - FooBar
Content
Foo
Bar
Baz
Sidebar
All the
way
down
here

We you could float your contents to the right

<div>Your Header</div>
<div style="float: right;">Your page content....</div>
<div style="width: 20%">Your menu</div>
<div style="clear: right;">Your footer</div>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


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.