Customizing SMF > Graphics and Templates

Fixed bottom navigation.

(1/4) > >>

Surf3rDud3:
Im trying to make a fixed bottom navigation on SMF.

Example is http://forum.tf2gods.com/

Is it hard to do this?

mashby:
Not hard at all. A little CSS love:

--- Code: ---.navdiv
{
position: fixed;
bottom: 0px;
right: 0px;
width: 100%;
z-index:9999;
}
--- End code ---
Include the content/stuff for it in index.template.php.

Surf3rDud3:
Ok. I got the CSS part but what about the template? I'm a bit of a newbie.

mashby:
Others should correct me if I'm wrong, but due to the positioning, it can go pretty much anywhere. In the example site you provided, the div with that class is near the top of the template. Personally, I would use a div ID in this case, but it doesn't really matter all that much
CSS:

--- Code: ---#bottombar
{
position: fixed;
bottom: 0px;
right: 0px;
width: 100%;
z-index:9999;
}
--- End code ---
You may also want to adjust some of the display stuff in there. The example site made a table with one cell which is a little unnecessary.
Code for index.template.php:

--- Code: ---<div id="bottombar">
This is the HTML part for said div. You likely know what you want here.
</div>
--- End code ---
Does that help a little?

Surf3rDud3:
One more question the


--- Code: ---<div id="bottombar">
This is the HTML part for said div. You likely know what you want here.
</div>

--- End code ---
Here is my template...

I understand the CSS part but the php im not so sure. Can you just add in there and upload it? Then ill look at it and learn from it?

Navigation

[0] Message Index

[#] Next page

Go to full version