Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Static/fixed sidebar

    Apologies if this in the wrong section.

    Is it easy to customise a website/blog so that the sidebar remains static and doesn't scroll with the rest of the page?

    I'm not asking for anyone to go to the trouble of explaining the whole process to me, but if anyone knows of a site that has a step by step 'idiot sheet' for doing this, I'd appreciate the link.

    This is the kind of thing I'm talking about, but my (lack of) knowledge when it comes to coding means I don't know what section of that templates html/css controls the static sidebar. If someone could look over the sourse code of the following site and tell me where the relevent block of code begins, It'd be a step closer.

    http://btemplates.com/2010/blogger-t...e-oulipo/demo/

    Thanks in advance.

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Its being styled in the stylesheet by the
    #main_nav style rule. position: fixed; specifically sets that navbar to a fixed position and not scroll with the rest of the page.
    Teed

  • #3
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts
    So the only line of code I need to fix a sidebar is:

    #main_nav style rule. position: fixed;

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Ok I'm confused. The link you posted is not your site? And I thought you were asking what css specifically fixed that sidebar so it didnt scroll. The css code I showed you sets the sidebar as in the link you provided. If you dont want it fixed then yes remove position: fixed;

    You asked about some tutorials. w3schools.com is pretty good for learning beginning html and css along with other client and server side languages.
    Teed

  • #5
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Sorry, teedoff.

    The site I posted is not my site. It's a template I was using for my blogger blog, but for various reasons Ican't use it. I used it merely as an example of the static sidebar, in the hope that I could apply the relevent code to another template that doesn't have a static sidebar.

    I've searched for templates with static sidebars, but there doesn't seem to any coming up in my search results - which is why I'm looking to convert one.

    I was just hoping there was a simple block of code I could apply to the html/css to make the sidebar static, in a template that doesn't already have a static sidebar.

  • #6
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Google 2 column layouts. Theres lots around. Then you can add a menu(if needed) and then add the above position: fixed; to it.
    Once you have a 2 column layout, and you need help, then post back your issues.
    Teed

  • #7
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Thank you so much, teedoff, I really appreciate your help.

    So if I find a two column template that I like, I post the link here and you'll tell me where to insert the code that will fix the sidebar?

  • #8
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Sure. just post your link or code and we'll try and help as best as we can.
    Teed

  • #9
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Thanks again, Teed.

    Okay, I know it's a mess, but I can sort that out later. If you could tell me how to fix the sidebar on this blog I'd be forever grateful.

    http://2alkbox.blogspot.com/

    I'll probably be turning in soon (bed) so I may not get back to you tonight. But I will return tomorrow at some point.

    A better and cleaner example of what I'm looking to achieve can be seen at this site:

    http://itistheworldthatmadeyousmall.com/
    Last edited by OurJud; 02-16-2011 at 04:39 PM.

  • #10
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Can anyone else pick this up? It seems from Teed that it's a fairly simple process, but it's still beyond my capabilities.

  • #11
    Regular Coder
    Join Date
    Feb 2010
    Posts
    224
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Never mind, I've done it. Thanks for your help, Deed.

  • #12
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    ahh Sorry I completely forgot about your post. Glad you got it working!
    Teed


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •