- This topic is empty.
December 28, 2010 at 3:30 am #31108
I am building a new theme for my blog and I need to do it before 1st Jan. Its almost complete but I am encountering a problem:
The last 2 Widgets i.e., FEATURED POSTS and RECENT POSTS in sidebar are set to float (positioned absolute) so that they are always visible when a user scrolls down. But how do i stop floating after reaching the footer? Any help would be really appreciated.
EDIT: I found out this demo of a “floating anything in a constrained area“. But I’m not good with JS so I dont know how to take help with it. Help?December 28, 2010 at 4:49 am #67536
Why are you using images for your sidebar? You can easily achieve what you made with CSS. I think you might want to clean up your code. Your missing semicolon’s in some areas and I checked your markup validation and found that you have 26 Errors and 4 warnings. What you’re trying to achieve can be done with jQuery. Chris has a tutorial on this HERE.December 28, 2010 at 5:48 am #67541
Those Big images in blue, green etc are for testing purpose. They will be then replaced by post thumbnails.
And semi-colons? In the JS? Sorry but i dont know how to fix them, i followed this tutorial
Chris’s tutorial doesnt solve this problem. View the demo and increase the margin-top. This would make the content height shorter and thus menu will overflow :(December 28, 2010 at 6:15 am #67542
Corrected most of the errors that I got while using W3C Validator (except pseudo-elements, don’t know how to fix them)
Now, the sidebar goes below the footer when scrolled to the bottom. How do I make it stop?December 28, 2010 at 4:08 pm #68472clokey2kParticipant
The jquery plugin would be a better way to go.
Include the plugin on the page like any other ‘js’ file. Then call it using a selector:
I haven’t tried it, but that should work. The #sidebarsfloat wont scroll higher or lower than the ‘div’ it is contained within. Give it a go?December 28, 2010 at 4:59 pm #68474
I agree, jQuery would be the solution.December 30, 2010 at 12:34 am #68246
Na, it doesn’t work properly. Some other guy has contacted me and he’s helping me to do so I cant show you in the demo. Maybe tomm, I’ll add that JS code. I guess some problem with CSS
EDIT: I made it to work, that too without any knowledge of JS, just played with it a little. W00T!
- The forum ‘CSS’ is closed to new topics and replies.