The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Setting Nav bar width?

View previous topic View next topic Go down

Solved Setting Nav bar width?

Post by Tattastic on February 1st 2016, 8:32 pm



Had an idea for changing the look of my forum, I have moved the Nav bar to the top of my page (image above, code below).

Code:
#page-header .navbar {
  position:absolute;
  top:0;
  left:0;
  right:0;
}

But my question is how can I set the width of my Nav Bar? I want to match the forums width (1291px).

Thanks in advance for any help

Tattastic
Forumember

Male Posts : 104
Reputation : 1
Language : English
Location : Middlesbrough, UK

http://www.clan-aom.com

Back to top Go down

Solved Re: Setting Nav bar width?

Post by Ange Tuteur on February 1st 2016, 8:59 pm

You can add the
Code:
width
property :
Code:
width:1291px;

but you'll need to drop the
Code:
right
property. If you set both the left and right to 0 the containing element will span the width of the webpage instead. You might need to make a few adjustments afterwards, because the navbar will be off center due to the left property being set to 0.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Setting Nav bar width?

Post by Tattastic on February 1st 2016, 11:44 pm

Thanks for the reply, I have tired that, and found the width required for my pc resolution (left 300px), but then when viewing it on my laptop (smaller resolution) is is off centre because there is not a 300px margin at the left side.

Is there any code so you dont need to adjust the margins, but can just tell it to centre?

Tattastic
Forumember

Male Posts : 104
Reputation : 1
Language : English
Location : Middlesbrough, UK

http://www.clan-aom.com

Back to top Go down

Solved Re: Setting Nav bar width?

Post by Van-Helsing on February 2nd 2016, 1:34 am

Hello,
You can change the position on your css code from absolute to relative.

Example:
Code:

        #page-header .navbar {
          position:relative;
          top:0;
          left:0;
          right:0;
          width: 1291px;
        }

Van-Helsing
Hyperactive

Male Posts : 2197
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: Setting Nav bar width?

Post by Tattastic on February 2nd 2016, 8:55 pm

Sorted it, just took left and right margin out of the coding Cool

Tattastic
Forumember

Male Posts : 104
Reputation : 1
Language : English
Location : Middlesbrough, UK

http://www.clan-aom.com

Back to top Go down

Solved Re: Setting Nav bar width?

Post by APE on February 2nd 2016, 10:45 pm

Topic solved and archived   





APE
Manager
Manager

Male Posts : 8311
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum