News:

On Deck: Next is "Bluemoon" For SMF 2.1.4! ;)

 

Recent Topics

Members
Stats
  • Total Posts: 10,779
  • Total Topics: 1,379
  • Online today: 202
  • Online ever: 879
  • (Jan 21, 20, 05:49:15 PM)
Users Online
Users: 0
Guests: 15
Total: 15

Flagrantly 2.0 Navbar centered

Started by markre, Aug 04, 11, 07:16:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

markre

Hello,

I'm using Flagrantly 2.0 on SMF 2.0.
Is there a way to center the navbar?

I used the Forum-Search, but didn't find something working for this Theme.

Crip

Hi,
Not far as i no , it's float--left or float--right .. you are welcome to try & Center it yourself.
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

markre

Hm, wathever I do, it doesn't work... :(

Not the float, the margin, the padding, the text-align, the position - or any possible combinations of them.

Crip

i can ''try'' a few things and post here if i can center it...
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

markre


markre

Ok, seems to be not so easy as I hoped.

But never mind, meanwhile I turned my page (www.mariokretschmer.de) ONLINE. ;)

The Navbar can also move later if it's possible.

ZarPrime

#6
markre,

You could align the Navbar in the center, or get it close, but it's not very precise and there is really not a very good way to do it.  There is no way I know of to float a menu to the center, only left or right.  However, you could use some alignment properties to do it though it's not ideal.  The problem is that the number of menus, and thus the width, is different, depending on whether you are looking at it as a Guest, logged in as a regular member, or logged in as an Admin.

For instance, in SITE/Themes/Flagrantly_20/css/index.css?fin20 you can find the following ...


#navtop {
position: relative;
height: 32px;
z-index: 1000;
padding: 0;
margin: 0;
}


If you remove the "margin: 0;" property and add the 3 properties I replaced it with, as shown below, you can come pretty close to centering the NavBar.


#navtop {
position: relative;
height: 32px;
z-index: 1000;
padding: 0;
    margin-left:auto;
    margin-right:auto;
    width:710px;
}


Like I said above, the width would be a problem, and have to be adjusted, if more menu items are shown when logged in.  The images below show what the site would look like (with these extra properties) when viewed by a guest with both a smaller browser window (top image) and a full size browser window at a resolution of 1280px by 800px (bottom image).  Right now, I can't think of a better way of doing this but maybe one of the other Team Members here has an idea.  My recommendation would be that you either float the NavBar left or right with this theme and not try to center it.

ZarPrime




Crip

I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

ZarPrime

Quote from: Crip on Aug 06, 11, 03:11:31 PM
Brilliant ZarPrime.  O0

Thank you My Master. 8) I am honored. :laugh:

ZarPrime

Crip

I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.