1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.



Fixed Sidebar

Discussion in 'IPB 1.3' started by Revo., Apr 11, 2010.

  1. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    Written by: Mer aka beautifulLIE
    Coding help / Inspiration: None. This was requested several times so I finally caved.
    Preview:
    [IMG]
    What it does: It makes your sidebar stay in one place and the rest of your board scroll. So you always see the sidebar. This does have limitations. You should only make your sidebar 600px high max or it will turn into a scroll and not look as nice. Also, in older versions of IE (anything below version 7) it won't be fixed, but what we call 'absolute' and look like a regular sidebar.
    Installation Instructions: This is a bit tricky to make work with all skins and will take some finagling. If you need help you're welcome to come to my coding shop or the Help Me! forum for help.
    If your board already has wrappers you might want to take out the background-color: #d8d8d8; and/or replace the wrappers entirely. This will also prove tricky if the skin you want to use already has sidebars set up.

    Also, I recommend that you use a fixed body background so you don't make people dizzy! (Example: background: url(http://colourlovers..../696/696702.png) #ddd fixed;)

    BEST VIEWED IN FIREFOX. Has only been tested in IE & FF.
    Code:
    HEADER & BODY
    Code: Select
    <div id="sidebar"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    
    </div><div id="mwrap">
    <% BOARD HEADER %><% NAVIGATION %>
    <% BOARD %><% STATS %>
    
    FOOTER
    Code: Select
    <div style="text-align:center;">Sidebar coded by <a href="http://www.rpg-directory.com/index.php?showuser=6066">Revo. @ RPG-D</a></div></div>
    CSS FOR LEFT ALIGNED
    Code: Select
    #mwrap {width:730px; background-color: #d8d8d8; margin:0px; margin-left:220px; padding:10px; }
    #sidebar {height:100%; width:180px;background-color: #d8d8d8; padding:10px; overflow:auto;position: absolute; left: 10px; top: 0px;}
    body > div#sidebar { position: fixed; }
    CSS FOR RIGHT ALIGNED
    Code: Select
    #mwrap {width:730px; background-color: #d8d8d8; margin:0px; margin-left:10px; padding:10px; }
    #sidebar {height:100%; width:180px;background-color: #d8d8d8; padding:10px; overflow:auto;position: absolute; left: 790px; top: 0px;}
    body > div#sidebar { position: fixed; }
  2. Offline

    Black Boys Rock I hold truth like a torch.

    Member Since:
    Dec 30, 2008
    Total Posts:
    1,072
    Likes Received:
    58
    Gender:
    Male
    Location:
    NY, ny
    hey, Beauty, thanks for making this but i dont think i know how to install it? i added it to the Headers/Body above <%Board header%> but it just places a block of text above the forum?

    doesn't make a sidebar or anything... i'm sorry im not as technically inclined as some... :sweat:
  3. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    If you want to pre-register me an account with ACP access and PM me the username and password I'll install it for you. I wouldn't recommend giving that out to anyone, but we've talked via PM and I'm staff... so I'm trustable? =P
  4. Offline

    seanbear. 1560.

    • 'D Contributor
    Member Since:
    Mar 2, 2007
    Total Posts:
    10,481
    Likes Received:
    92
    Gender:
    Male
    <div align=center><span style='font-size:17pt;line-height:100%'>ACCEPTED INVISION FINAL 1.3 CODE</span>
    <span style='font-size:11pt;line-height:100%'>[color=7f323a]THANK YOU FOR YOUR SUBMISSION[/color]</span>
    Thank you for submitting to our codex and giving forums everywhere an easily installable piece of code to enrich their board! Keep up the great work and we look forward to seeing more from you!</div>
  5. Offline

    Helina's Fate Member

    Member Since:
    Mar 11, 2010
    Total Posts:
    21
    Likes Received:
    0
    Is there any way of making it on the right-hand side instead?
  6. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    Yup, added it to the first post.
  7. Offline

    200footdrop Community Devoted (M)

    • Community Devoted
    Member Since:
    Jan 23, 2008
    Total Posts:
    302
    Likes Received:
    26
    Gender:
    Male
    Location:
    Naples, FL
    I would be willing to test this out for you in all of my other browsers (like 5 I think) if you give me a link to a site with this Mer.
  8. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    Sean is using it here and so is this forum. Sean's is a bit edited but the other forum is pretty much the exact coding.
  9. Offline

    200footdrop Community Devoted (M)

    • Community Devoted
    Member Since:
    Jan 23, 2008
    Total Posts:
    302
    Likes Received:
    26
    Gender:
    Male
    Location:
    Naples, FL
    Works in opera and chrome, My other browsers are crashing due to issues with some things on my computer. All based on second link. I'll edit this and notify you when they work and I add other things (like filters)
  10. Offline

    Zwitterion Member

    Member Since:
    Mar 1, 2010
    Total Posts:
    311
    Likes Received:
    0
    I love this, seriously. It's wonderful! :D I'm wondering if you can get it so that there's a left-aligned one and a right-aligned one. My knowledge of HTML and CSS and how invision works is still quite limited, so I figured it be best to ask someone who obviously knows what she's doing!

    :D
  11. Offline

    TheGodfather I'll make you an offer you can't refuse.

    Member Since:
    Jul 23, 2009
    Total Posts:
    40
    Likes Received:
    0
    Hello, could I trouble you to install it for me? I tried a few times, but it keeps showing a huge paragraph above the banner. :/

    Thanks in advance!
  12. Offline

    Roswenth Oops.

    Member Since:
    Jun 12, 2006
    Total Posts:
    5,705
    Likes Received:
    357
    Gender:
    Female
    • Awards
    The copyright on this seems to imply that the whole skin is by Blue Bloods instead of just the sidebar.
  13. Offline

    LadyKinz New Member

    Member Since:
    Mar 19, 2011
    Total Posts:
    9
    Likes Received:
    1
    Not working. :/
  14. Offline

    The Domster Hatty, Des, and Elijah's love interest

    Member Since:
    Oct 23, 2010
    Total Posts:
    3,450
    Likes Received:
    2,269
    Gender:
    Male
    Location:
    Wherever the cute animals are
    • Awards
    I've been using it here? and it works quite well. If you're having trouble installing it or getting it to work, post in the Help Me! forum.
  15. Offline

    secretly.CRAZY New Member

    Member Since:
    Aug 6, 2011
    Total Posts:
    1
    Likes Received:
    0
  16. Offline

    Tunaforbreakfast Member

    Member Since:
    May 29, 2011
    Total Posts:
    104
    Likes Received:
    10
  17. Offline

    CHRISTO. New Member

    Member Since:
    Aug 1, 2011
    Total Posts:
    6
    Likes Received:
    0
    Will add to the credits list once this site opens up.
    Thanks for having this!
  18. Online

    they-go abraxan kneazle & crup

    Member Since:
    Oct 22, 2011
    Total Posts:
    417
    Likes Received:
    196
    Gender:
    Female
    What is the purpose of the mwrap? Because when I have the div in the wrappers, it causes a wide stretch of white in the board, before the gap and the sidebar, but when I remove it, it doesn't have that.
  19. Offline

    Black Boys Rock I hold truth like a torch.

    Member Since:
    Dec 30, 2008
    Total Posts:
    1,072
    Likes Received:
    58
    Gender:
    Male
    Location:
    NY, ny
    hm, for some reason this code does not work for me whatsoever; i CnP'd the code exactly as its written here and added the css and html portions and only get an 'absolute' version which is no different from a standard sidebar; am i doing something wrong?
  20. Offline

    LeiLei Member

    Member Since:
    Jun 23, 2010
    Total Posts:
    15
    Likes Received:
    0
    Gender:
    Female
    I really love this code :) I'm using it here

Share This Page