Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] drop a widget to the bottom of a sidebar (http://forum.bytesforall.com/showthread.php?t=17759)

--yeah--wow Jun 6, 2012 05:02 PM

[SOLVED] drop a widget to the bottom of a sidebar
 
I've got a right sidebar with 4 widgets. I want the bottom widget to always appear at the bottom of the page, and not just below the 3rd widget. Of course if there is little info in the post area it has to fit just below the 3rd widget, but if the post area is longer I want the widget to move down also, so that the widget is always at the bottom of the page.

I have tried a lot of things, searched (again and again) in all the posibilites with CSS ans also found no solution in this forum. Is there a solution to this? Who can help me?

lmilesw Jun 6, 2012 05:14 PM

Have you experimented with absolute positioning for the bottom widget.

--yeah--wow Jun 6, 2012 05:31 PM

Sure.

I just checked again. I have

Code:

#text-2 {
padding-right: 20px;
position: absolute;
bottom: -100px;
}

in the CSS inserts. text-2 is the id of the last widget in the right sidebar (which is a td with id "right"). It will position the last widget in another place, but it is no solution. The last widget can be shown outside the sidebar this way, if you choose some value for bottom. If there is a long page, I expect the sidebar td is also as long as the post area, but there seems to be no way to position the last widget to the bottom of the sidebar.

--yeah--wow Jun 6, 2012 06:22 PM

Just did some more research and concluded that it cannot be done (but I am open to suggestions)...

In this case I wanted to have a tiny image in the right-hand side of the website. In stead of putting it in a widget I now put it in the footer and with some padding/margins and an extra blank line at the end, it is in a postion that is about right...

Fixed it with a workaround, but I am not complaining.

It leaves the original question open though...

juggledad Jun 6, 2012 06:58 PM

you could possibly do it via a jscript. This is how the footer option 'Sticky footer on short pages?' works. You can look at the code in js.php

--yeah--wow Jun 6, 2012 07:07 PM

Ok, I'll look into this. More for future reasons than for the current problem. I fixed this with a workaround (see my reply above).
Thanx for the advice though!

lmilesw Jun 6, 2012 08:27 PM

I just tried what I suggested and it worked fine. Here is what I used for my test in CSS Inserts.
HTML Code:

#text-2 {
    position: absolute;
    width: 160px;
    bottom: 92px;
}

What happened in your test? I also don't understand the negative bottom position.

--yeah--wow Jun 7, 2012 06:14 AM

#Imilesw:
Thanks for your reply. Your code seems to place the widget at a fixed point in the right sidebar, independent of the length of the page. If I have a page that is not too long it can be outside the frame of the page, and if I have a long page the widget does not sit at the bottom of the sidebar.

I guess that is what absolute positioning does.

The widget needs to sit just on top of the footer, and in the right sidebar. In my case it is just a small image in the text widget, so I now put it in the footer, which is almost OK.


All times are GMT -6. The time now is 01:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.