HOME | DD

GinkgoWerkstatt β€” Code Basics: Sidebar- Absolute

Published: 2010-04-11 12:49:54 +0000 UTC; Views: 7597; Favourites: 228; Downloads: 812
Redirect to original
Description


You need to have a Premium Account or to be a staff member/volunteer to use this


Every now and then it happens that i get asked how to code certain features for journals and similar to that i often see journals where someone struggles with coding from scratch or doesn't exactly know how to do what.
That's why i figured out that it might be helpful to have several very(!) basic code snippets, people can use to get started.

All these code snippets are rather plain code, mostly without any fancy images and much colors. They should just show the start. The possibilities of what can be done with that code are endless.
Also these snippets do not affect the journal in general, they will just add that featured "journal element" and nothing more.

I hope that this will be helpful for some people. To use the code snippets just click install. Everything can be found in the Skin Header or Footer and in the CSS form area.
No additional content code is needed!


Keep in mind that all these code snippets will refer to the gruze-structure, in case special journal classes will be affected by the code.







This code has additional information in the CSS code with explanation of how to move the sidebar to the left side.


Have suggestions for more basic codes? Just leave a comment or note me!


Code Basics:
Scrollbox
Topmenu
Sidebar (floating)
Sidebar (absolute)
Mood-List (absolute Position, without any background)
Topmenu (absolute Position)


Planned:
Credit (absolute Position)



Depending on my time, motivation and how useful this will be for people i might add more advanced code snippets later as well.

Related content
Comments: 42

craaziifox [2018-03-25 11:40:39 +0000 UTC]

hello!
i know this is like super old but i was wondering, everytime i put this code onto the featured deviation widget the text on the left doesn't appear??
i need help with this eep

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to craaziifox [2018-03-25 15:07:27 +0000 UTC]

The widgets are different than journals (what this was meant for). So it could be, that it's not working correctly on the widgets. But I haven't done anything with widget since years, so I can't tell you what is possible and what not these days.

There are some CSS related groups (or have been), maybe they can give you some more up to date help?

πŸ‘: 0 ⏩: 1

craaziifox In reply to GinkgoWerkstatt [2018-03-26 06:15:03 +0000 UTC]

ah alrighty.
thank you for letting me know!!

πŸ‘: 0 ⏩: 0

SapphyBlue [2015-07-14 11:44:55 +0000 UTC]

Flagged as Spam

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to SapphyBlue [2015-07-14 12:23:53 +0000 UTC]

Please spam elsewhere, thank you.

πŸ‘: 0 ⏩: 0

izUmI-o5 [2012-07-08 09:17:46 +0000 UTC]

Where should you insert this code?

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to izUmI-o5 [2012-07-08 10:07:15 +0000 UTC]

If you click install it is already at the right place. If you want to combine it with any other journal skin you just copy&paste it from the install to the other one (with the same places).

But you qill need a Premium Membership to be able to use CSS code first.

πŸ‘: 0 ⏩: 1

izUmI-o5 In reply to GinkgoWerkstatt [2012-07-08 10:55:37 +0000 UTC]

What if we combine it with another code? At what part of the body css will we put the code in?

Yes I know about premium membership~

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to izUmI-o5 [2012-07-08 18:50:32 +0000 UTC]

Place it either at the top or bottom, that doesn't matter at all, just don't mess up any other classes with it. It's just additional code.

πŸ‘: 0 ⏩: 0

smoshii [2011-11-27 21:53:06 +0000 UTC]

;0; Would it be possible to put a simple background, perhaps just a white one into this code?
It bothers me that it's smack over the text, makes it hard to read (with my background anyway)
Sorry to bother you. ;____;

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to smoshii [2011-11-28 15:43:23 +0000 UTC]

Sure, if you want to add a simple background color, you just have to use
background: #fff;
and add that to the class you get after installing this. In this case it should be the .sidebar class

Just place it somewhere between the {...}

πŸ‘: 0 ⏩: 1

smoshii In reply to GinkgoWerkstatt [2011-11-28 22:43:19 +0000 UTC]

;0;!! Thanks so much!
You were a huge help ffffff

πŸ‘: 0 ⏩: 0

DragonSoulx [2011-08-31 20:00:00 +0000 UTC]

Excuse me, but where do you put this? Anywhere I put it in my journal code it still doesn't work...

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to DragonSoulx [2011-09-01 14:51:00 +0000 UTC]

After you installed this, it's already at the placed where it should be. If you want to add it to any other journal, just copy&paste the code and add them to Skin Header and CSS again.

πŸ‘: 0 ⏩: 1

DragonSoulx In reply to GinkgoWerkstatt [2011-09-01 16:36:44 +0000 UTC]

I know, but where in the CSS? I'm pretty new to this so it's probably a stupid question...

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to DragonSoulx [2011-09-01 16:56:10 +0000 UTC]

It doesn't matter where. Can be at the beginning or the end or somewhere in between. The best is to add it to the bottom and a blank space - not between any brackets or class properties.

πŸ‘: 0 ⏩: 1

DragonSoulx In reply to GinkgoWerkstatt [2011-09-01 17:24:12 +0000 UTC]

Thank you so much! ^^

πŸ‘: 0 ⏩: 0

beXTHehedGeHOG259 [2011-05-23 16:32:01 +0000 UTC]

Sorry if I'm disterbing you, but how do I use this????

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to beXTHehedGeHOG259 [2011-05-23 16:56:59 +0000 UTC]

After installing it (green button at the bottom), you need to go to your journal page and click on that scrollbar skin. Then the code gets applied to your journal. The HTMl code can be found at the "Skin Header" section when you click "Edit Skin".

If you want to use the scrollbar with any other skin just copy&paste the HTML and CSS code.

πŸ‘: 0 ⏩: 1

beXTHehedGeHOG259 In reply to GinkgoWerkstatt [2011-05-23 17:27:14 +0000 UTC]

Aww, you see my firend has done this to her journal [link]
Can you tell me how I can get it like this please?? (I have a blue vercion)
Its ok if you carn't. ^^

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to beXTHehedGeHOG259 [2011-05-23 17:35:19 +0000 UTC]

She just did what i told you before
She copied the HTML and CSS code and modified it a bit (changing colors and the heights). That is all you have to do as well. Maybe ask your friend to share the code with you, so that you just need to change the colors?

πŸ‘: 0 ⏩: 1

beXTHehedGeHOG259 In reply to GinkgoWerkstatt [2011-05-23 18:11:10 +0000 UTC]

Oh ok.
Thank you so much, I'm so sorry for being a pain.

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to beXTHehedGeHOG259 [2011-05-23 18:22:53 +0000 UTC]

You are not, but there is not way to explain it "easier" for me :/

πŸ‘: 0 ⏩: 1

beXTHehedGeHOG259 In reply to GinkgoWerkstatt [2011-05-23 18:56:59 +0000 UTC]

Its ok I'v got it now. ^^
Thank you again

πŸ‘: 0 ⏩: 0

DJ-BluehKitteh [2011-04-22 15:33:11 +0000 UTC]

this was very helpful along with other of your css tutorials
how would you make a sidebar scroll so you can put as many stamps/links without making it go over the journal css? thanks

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to DJ-BluehKitteh [2011-04-22 18:26:08 +0000 UTC]

You need to give the sidebar or an element inside of it a fixed height. And then you need to add overflow: auto;. That is all

πŸ‘: 0 ⏩: 0

beccj [2010-07-08 09:55:11 +0000 UTC]

this is brilliant, thank you

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to beccj [2010-07-08 10:12:42 +0000 UTC]

πŸ‘: 0 ⏩: 0

blissart [2010-04-14 08:37:30 +0000 UTC]

Those are some nifty tutorials!

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to blissart [2010-04-14 14:11:35 +0000 UTC]

YAY!

πŸ‘: 0 ⏩: 0

CookiemagiK [2010-04-12 21:15:53 +0000 UTC]

What's really the difference between using absolute and relative+float for sidebars? Are there any visual differnces or does it all just depend on what you prefer to do?

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to CookiemagiK [2010-04-13 15:14:18 +0000 UTC]

I hate to explain that - but yeah there are differences.
The "floating" version is still bound to the general box modell structure - it just moves content that is in their way away. So that content and the sidebar will never overlap. Means they both affect each other (or mainly the floating sidebar the usual content).

The "absolute" version doesn't care for the box modell or any structure. It has a defined place and will stay there, no matter if you have regular content at that place already. That means, that whenever you use something "absolute", you have to create free space for it. Otherwise text and sidebar will overlap.
I have made some graphical examples at my CSS guideline a while ago, maybe take a look at that. Images explain that easier most of the time

So it's not just a matter of what you like more, but also on what is needed for a certain layout.

πŸ‘: 0 ⏩: 1

CookiemagiK In reply to GinkgoWerkstatt [2010-04-13 15:31:18 +0000 UTC]

Oh I see! Thanks for the explanation. I'll go take a look at your examples too.
When they overlap, how is it decided what will go on top if they both have the same z-index?

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to CookiemagiK [2010-04-13 16:01:04 +0000 UTC]

Yes, if you work on a normal website everything has the same z-index by default.
For the journals they already have a different order, so everything of the predefined classes like .journalbox/.gr-body will be below anything that is custom made by you.

That means that whenever you create a sidebar it automatically will be put on top of the regular journal content you just type down without any extra wrapping code and order.

πŸ‘: 0 ⏩: 1

CookiemagiK In reply to GinkgoWerkstatt [2010-04-13 18:08:04 +0000 UTC]

ah ok. Thanks

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to CookiemagiK [2010-04-13 18:39:19 +0000 UTC]

πŸ‘: 0 ⏩: 0

omgitsacat [2010-04-11 13:32:26 +0000 UTC]

You're so good to share things like this

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to omgitsacat [2010-04-11 15:33:30 +0000 UTC]

Haha no, i am not good.

It is just a way to hopefully prevent that i have to answer the same questions again and again

πŸ‘: 0 ⏩: 1

omgitsacat In reply to GinkgoWerkstatt [2010-04-11 15:35:53 +0000 UTC]

lol

πŸ‘: 0 ⏩: 0

detail24 [2010-04-11 13:22:29 +0000 UTC]

Die gefallen mir, schΓΆn einfach, simple und so

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to detail24 [2010-04-11 15:32:55 +0000 UTC]

Das ist Sinn der Sache!

πŸ‘: 0 ⏩: 0

NevermindSleep [2010-04-11 12:53:38 +0000 UTC]

Awesome! Will be trying some of these out.

πŸ‘: 0 ⏩: 1

GinkgoWerkstatt In reply to NevermindSleep [2010-04-11 13:09:42 +0000 UTC]

That's good to hear!

πŸ‘: 0 ⏩: 0