Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Center Admin Buttons  (Read 523 times)

0 Members and 1 Guest are viewing this topic.

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Center Admin Buttons
« on: May 11, 2018, 01:30:59 am »

Hi, I am developing a theme and have hit an issue

I am attempting to center the admin menu and have not figured out as yet how.
My first attachment is what I have, the second is a photoshoped image of what I want

I have looked at the css code of everything marked .admin_menu
I tried to remove .admin_float and got what is pictured in the 3rd image
So then I tried to replace the values of float with display flex values ranter than display block in an attempt to have more control and it didn't affect it.
I can't figure out what I am missing?
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 836
Re: Center Admin Buttons
« Reply #1 on: May 11, 2018, 01:21:36 pm »

A link to your site with the theme will get you much more help.
Logged

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Center Admin Buttons
« Reply #2 on: May 13, 2018, 01:08:19 am »

Here is the link : http://coppermine.geekgirl-chic.com/index.php

Since it is the admin panel I didn't think a link would help, since you can't see it from the link
So I included the attached screen grabs in the first post
And I am being paid to create the theme, so I can't upload a copy

Centering the sys & sub menus was easy, its just the admin buttons
I can't figure out why its so dependent on the float css to stay normal sized
or why i can't control the divs with display: flex rather than display: block
I just want to get them centered. With the new format in 1.6 making the rows and grouping the buttons is super easy
If I can just get a handle on centering the groups I will be a super happy camper

Thanks for any help you can offer
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 836
Re: Center Admin Buttons
« Reply #3 on: May 13, 2018, 02:57:32 am »

If it makes any difference ... the link you provided points to a CPG 1.5.46 gallery.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 836
Re: Center Admin Buttons
« Reply #4 on: May 13, 2018, 03:20:07 am »


For .admin_float :
get rid of float:left
set display:inline-block

For .admin_menu_wrapper :
set text-align:center
Logged

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Center Admin Buttons
« Reply #5 on: May 13, 2018, 09:04:30 am »

My apologies. I built the theme on 1.5 first then moved it to 1.6
at a different url to make sure the theme would not break once she upgraded.
So I grabbed the incorrect link.

My issue though, was occurring in both 1.5 & 1.6 though, so it really doesn't matter.


well I feel stupid.
I had tried that one point and I have either saved it wrong, or forgot to remove the float value after changing it to inline-block.
because just changing it to inline and removing the float worked and centered the admin buttons.
I suppose this is what I get for coding at 3 in the morning.

I do have one last question though...
No where in my style.css do I have a line called .admin_menu_wrapper
Nor can I find it in the file titled coppermine.css
Where is it located?

Otherwise my issue is solved.
Thank you
Logged

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Center Admin Buttons
« Reply #6 on: May 13, 2018, 09:14:58 am »

Well, it is fixed for 1.6 but not 1.5
When it first loads, it looks centered but when I hit the home button, all the admin buttons shove back over to the left
but only in 1.5 so I am guessing it has something to do with the admin wrapper that I can't locate?
Logged

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Center Admin Buttons
« Reply #7 on: May 13, 2018, 10:59:08 am »

ok, I spoke too soon.
It is half fixed, inline will let me center in 1.6 but it puts huge gaps between every thing
If I edit out comments and spaces I get a template error
And when i try to display flex, i am still getting a column no matter what flex code modifiers  I use
My ultimate goal for this theme is to have it written entirely in css and flex
Which i have nearly done except for how the admin menu is not responding


Attached images :
Inline gaps (Admin 4)
Display flex (Admin 5)

I can PM you and admin password if that will help?
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 836
Re: Center Admin Buttons
« Reply #8 on: May 13, 2018, 12:42:59 pm »

PM me links to both sites and admin credentials for both ... and I'll help you sort it out.
Logged

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Center Admin Buttons
« Reply #9 on: May 13, 2018, 02:58:30 pm »

I finally figured it out.
I still have no idea where the css for the admin menu wrapper is but it is not affecting the layout in any way that I can see

I managed to get flex working to control the menu thanks to your help in clearing out the float code.
My mistake was in not using enough containers to group the menu items
Once I layered in enough of those to break it into the groups I needed it worked like a charm.
Thank you so much for helping me with this I really appreciate it!

I have the theme fully css, responsive down to mobile except for a few items
Which I will sort out after copious amounts of sleep
I attached a final screen shot so you could see the new menu
though i am likely to reorder the buttons before i deliver it

Can't thank you enough
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 836
Re: Center Admin Buttons
« Reply #10 on: May 13, 2018, 04:37:06 pm »

Unless overridden, the admin_menu_wrapper class is generated by the CPG code. All you have to do is add an entry for .admin_menu_wrapper with the attributes you want to your CSS.
Logged

justmickie

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Center Admin Buttons
« Reply #11 on: May 14, 2018, 01:17:54 am »

That is why i couldn't find it then!
Thank you.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 23 queries.