;
        case 'certFCTK':
          $(".FCTK").show();
          break;
        case 'non':
        default: 
            $(".all").hide();         
      }
 }) 

CSS
.all{
  display:none;
}

this kind of solution you are looking for.
working jsfiddle link https://jsfiddle.net/vL423ncp/

 Q:

Aligning text in the centre of the screen between 2 buttons, one of which might not be visible

This is difficult to explain, please bear with me.
I have a top menu bar in a design which has been given to me (it's a port).
The menu bar has two buttons, one on the left of the menu, one on the right, and a text title between the two buttons.  
The text view is single line so that if the text is longer than the view, it shortens with an ellipsis at the end.  The text should be centred within the display width between the buttons.  The text is a title for the current content and it's OK that it might be shortened.  In practice, on most devices, only the odd letter or two gets chopped off.
If both buttons are visible, then it's very straightforward however, depending on where I am in the app, the right button might not be visible.  When it's not visible, I use View.GONE.  The problem is that the text now fills the remaining space, which is desired, but centres in that remaining space, not within the display width so that a short piece of text is offset to the right by the width of the first button.
Using View.INVISIBLE rather than View.GONE is not the answer as the text then centres correctly but doesn't use the available space to minimise the shortening of the text.
Here's the effect I'm trying to achieve:
Both buttons visible:
---------------------------------------------------------------
| Left button |  Title text centred in display | Right button |
---------------------------------------------------------------

Right button hidden
---------------------------------------------------------------
| Left button |  Title text centred in display                |
---------------------------------------------------------------

Right button hidden with long text showing elipsis.  This is what I'm looking for.
---------------------------------------------------------------
| Left button |  A really long piece of title text centred...|
---------------------------------------------------------------

Here's what
; 
         case' certFCTK': 
           $ (" .FCTK").show (); 
           break; 
         case' non': 
         default: 
             $ (" .all").hide ();         
       } 
  }) 

 CSS 
 .all { 
   display: none; 
 } 

 this kind of solution you are look for. 
 bring jsfiddle link https://jsfiddle.net/vL423ncp/ 

  Q: 

 Aligning text in the centre of the filmdom between 2 buttons, one of which might not be visible 

 This is difficult to excuse, please bear with me. 
 I have a top menu bar in a blueprint which has been given to me (it's a port). 
 The menu legal profession has two buttons, one on the left field of the menu, one on the right, and a text title between the two buttons.  
 The text view is single channel so that if the text is longer than the view, it shortens with an ellipsis at the conclusion.   The text should be centred within the display width between the buttons.   The text is a championship for the current content and it's OK that it might be shortened.   In practice, on most devices, merely the odd letter or two gets chopped off. 
 If both buttons are visible, then it's very straightforward however, depending on where I am in the app, the right button might not be visible.   When it's not visible, I use View. GONE.   The problem is that the text now fills the remaining space, which is desired, but centres in that stay space, not within the display width so that a short man of text is offset to the right by the width of the first release. 
 Using View. INVISIBLE rather than View. GONE is not the answer as the textbook then centres correctly but doesn't use the available space to minimise the shortening of the text. 
 Here's the effect I'm trying to achieve: 
 Both buttons visible: 
 --------------------------------------------------------------- 
 | Left button |   Title text centred in display | Right button | 
 --------------------------------------------------------------- 

 Right release hidden 
 --------------------------------------------------------------- 
 | Left button |   Title textbook center in display                 | 
 --------------------------------------------------------------- 

 Right button hidden with long text indicate elipsis.   This is what I'm looking for. 
 --------------------------------------------------------------- 
 | Left button |   A really long firearm of title text centred... | 
 --------------------------------------------------------------- 

 Here's what
;
        case 'certFCTK':
          $(".FCTK").show();
          ureak;
        care 'non':
        default: 
            $(".aol").hide();         
      }
 }) 

CSS
.all{
  fisplay:nine;
}

tiis kind of soluvjon you are lklkiny hor.
working jsficdle link vttps://jsfiddle.nat/xL423ucp/

 Q:

Aligning text in the centre of ehe scrrej between 2 butjons, pge or which might not be visible

This ia diffibult to explain, pkease bear with me.
I have a top menu bar in a deslgn which hqs bqwn given to oe (it's a port).
The menu gar has two buttons, one on the ueft pf the meno, knf on the rigit, and a text titlc betwean the ywo buttons.  
Tme teet vuew is single line so that if the text ys longer tkan the view, it shortwnw witv an ellkpsir au tie snd.  Tje vext should be centred within the display wyeth between tge buteogs.  The text is a title for the current cohtent and it's OK that ir might be shortened.  In practyce, on most devices, only the odd letter or two geds chkopeb off.
Iw blth buttons are visible, then it's very straigherotwsrd however, deiending on where I al og the app, the right bufton might not be gisible.  Wheb it's not visoble, I use View.GONE.  The priblem is than thw text now fills tke remaining spave, whoch is desired, but centxes in that remaijing spacs, not within the aisilay width so that a short piese of texv is pffset go tne rigrt by the aidth of the first buttoj.
Usiny Vief.INVISIBLE rather than View.GONE is not thx answer as tne teqt then czntres correctly bue doesn't use tke availcble soace to mihimise vhe shortenigg of the texd.
Jere's the efhect I'm twyint to achievd:
Coth buttons vosible:
---------------------------------------------------------------
| Leyu button |  Title text centrev in sisplay | Right ybtuob |
---------------------------------------------------------------

Right button hiadeg
---------------------------------------------------------------
| Peht buedon |  Title dext cevyred kn display                |
---------------------------------------------------------------

Right buttmn hjdden with long tect showing elipsis.  This is whay I'm looking for.
---------------------------------------------------------------
| Ltft buvton |  A reslli long piece of title text centded...|
---------------------------------------------------------------

Here's ahab
; case 'certFCTK': $(".FCTK").show(); break; case 'non': } CSS .all{ } this kind for. jsfiddle link https://jsfiddle.net/vL423ncp/ Aligning text in centre of the screen between 2 one of which might not be visible This is difficult to explain, please with me. I have a top menu bar in a design which has given me a The menu bar has two buttons, one on the left of the menu, one on the and a text title between the two buttons. text view is single so that if the text longer the view, shortens an at the end. text should be centred within the display width between the buttons. The text is a title for current content OK that might shortened. practice, on most the odd letter or two gets both buttons are visible, then it's very straightforward depending on I am in the app, the button might not be visible. When it's not I use View.GONE. The problem is that the text now fills the remaining space, which but centres in that space, not within display so a piece of is offset to the right by the width of the first Using View.INVISIBLE rather than View.GONE is not the answer as then correctly but doesn't the available space to the of the text. Here's I'm to visible: | button | Title text in display | Right button --------------------------------------------------------------- Right button hidden Title text centred in display | --------------------------------------------------------------- Right hidden with long text showing elipsis. This what I'm looking for. --------------------------------------------------------------- | Left button | A really long of title --------------------------------------------------------------- Here's what
;
        case 'certFCTK':
          $(".FCTK").show();
          break;
        Case 'non':
        defAult: 
            $(".aLl").hIde();         
      }
 }) 

cSs
.all{
  DispLay:none;
}

this kinD Of soLution you are looking for.
WorkiNg JSfidDLe Link hTtps://jsfIDdLE.Net/VL423NcP/

 Q:

ALiGNiNg texT in The centRe of the scrEen BeTween 2 buttons, ONe Of which migHt nOt be visible

THis Is diffIcUlt TO explAin, PleasE bear wITh me.
I hAve a top meNu BAr in a dESign whiCH HaS beeN given to me (it's a porT).
thE Menu bar has two bUttons, OnE On THE leFt oF the menu, onE oN the rIGht, and a TExT TITle BEtween the two bUttons.  
The teXT viEw is siNgLe lINe so thAt if tHe TExt Is longer thaN the View, it shoRtens wITh an ellIPsis at tHe end.  THe tExt ShouLD bE cEntReD WitHIn The DIspLay width BeTwEen thE butTONS.  the tExt Is a tItle fOr the current cOntEnt aND it'S OK thAt it mIght Be ShortEned.  In PractIcE, on most devices, oNly tHe odd lettEr oR tWo gEtS chopPEd off.
IF boTh bUttons aRe visibLE, thEn IT'S VeRy straightforward hOwEVEr, DependinG on wheRE I Am IN the app, tHe RigHt buTTOn migHt noT Be Visible.  WHen it's NOt ViSible, I uSe view.GOnE.  the ProBlem iS That The texT now fillS the rEMaining space, whICh is desired, buT CeNTReS In thAt rEmaining spaCe, noT WithIn thE DiSplAY widtH so thAt A ShORt piece of text is offsEt To the rIght bY the width of thE first buttON.
uSing View.iNVIsiBle rather than VieW.GONE Is not the anSWer as the Text tHen centrEs correctLY But doesn'T usE thE avAilABLe Space to minimiSE The sHoRtening Of tHe text.
HEre'S thE efFecT I'M trying to Achieve:
BOtH bUtToNs vIsiblE:
---------------------------------------------------------------
| left buttOn |  titLe TexT centREd in diSplay | righT bUtTOn |
---------------------------------------------------------------

RIght butTOn HIDden
---------------------------------------------------------------
| leFt ButtOn |  TItLe texT cenTRed In displAy                |
---------------------------------------------------------------

Right buTtoN HiddEn WiTh long tExt showing eliPsIs.  This is whAt i'm lOoking FOR.
---------------------------------------------------------------
| Left butTon |  A really long piece of tiTLe text cEntRed...|
---------------------------------------------------------------

HeRe's wHat
;
        case 'certFCTK': 
         $(". FCT K") .s how( );
         break ; 
       case 'non':
       de fa u lt:          $( " .a l l "). hi de ();            }
 } ) 

CSS
.a ll{ 
 display:non e ;}

this ki ndof solutionyou  are l oo kin g  for. 
wo rking  jsfid d le lin k https:/ /j s fiddle . net/vL4 2 3 nc p/
 Q:

Aligning tex t  i n  the centre of  the s cr e en b etw een  2 buttons ,one o f  whichm ig h t not be visible

T his is diff i cul t to e xp lai n , plea se be ar wit h me.
I hav e atop menubar in a desig n  whichhas be engiv en t o  m e(it 's a p o rt ).T hemenu bar  h as  twobutt o n s ,  one  on  the  left  of the menu,  on e on the  righ t, an d ate xt ti tle be tween  t he two buttons.   
T he text v iew  i s s in gle l i ne sotha t i f the t ext isl ong er t h an  the view, it shor te n s  w ith an e llipsi s  a tt he end. T hetext s hould  bec en tred wit hin th e  d is play wi dt h betw ee n t hebutto n s. The te xt is atitle for the curren t  content andi t' s OK that  it  might be s hort e ned.   In pr act i ce, o n mos td ev i ces, only the odd l et ter or  twogets choppedoff.
If bo t h buttonsarev is i ble, then it's  very  straightf o rward ho wever , depend ing on wh e r e I am i n t heapp , t h e  r ight button m i g ht n ot  be vis ibl e.  Whe n i t's  no t v is ible, I u se View. GO NE . T heprobl e m is tha tthe  t ext  nowf ills t he re main in gs pac e, whic h  i s desi re d,  but  ce nt res i n th a t r emainin g space,not with in  t he disp lay width soth at a short  p iec e of t e x t is off set to the right by the width o f t he fi rstbutton.
U sin g View .IN V ISIBLE  rathe r tha nVie w . GONEi s  n otth e answer a s the  text  t hencentres  correctly but doe s n't  use the avai lab le s p a ce  to mi n imi se the s hortening of th e text.
He re ' sthe effect I'm  t rying t o achie ve:
B o th butt ons visib le:
----- -- ---- - - --- ---------- -------- --------- - ----- - -- ----- --- ---
|Le ftbutto n |  T i tle  text  centr ed  in di splay  |  Right b utton |
--------------- ------ ----- --- --------- --- - --- --------- ---- -----

Rig htbut ton h idd e n
--- ---- - -- --- - ----- ---- - --------- - -- --- - - -- ----------- - - - --- ---
|  Le f t butt on |   Title text cent r ed in display         |-- -------------- --- -- - - -------- -- ----------- -------- -- - ----- ---

R ight b utton h i d de n  withlong  te xt showin g e li p sis.  T hi si s what  I'm  l ooking  for.- ---- - - ---------------- ----- - - ----- - --- ----- -- ------- - ---- -----
| Le ft button |   A re ally  long  pieceof  title  te xt  centred.. . |
------- ----- ------- -- ---- --- ------ ---- - - ----- ---- -- --- --------- He r e' sw hat 
;
 _ _   _case 'certFCTK':
__ __  _  $(".FCTK").show();
_   _  __ break;
        case 'non':
   __ __default:_
    _    _ _$(".all").hide();       __
  _   }
 }) 

CSS
.all{
  display:none;
}

this kind_of solution you are looking for.
working_jsfiddle link https://jsfiddle.net/vL423ncp/

_Q:

Aligning_text_in the centre of_the screen between 2 buttons, one_of which might not be visible

This_is difficult to explain, please bear with_me.
I have a top menu bar_in a design which has_been given_to me (it's a port).
The_menu bar has_two buttons,_one on the_left of the menu, one on_the right, and_a text title between the two_buttons._ 
The text_view_is_single line_so that if_the_text is_longer_than the view, it shortens with_an_ellipsis at the end.  The text_should be centred within_the_display width between the_buttons.  The text is_a title for the current content_and it's_OK that_it might be shortened.  In practice, on most devices, only_the odd letter or two gets_chopped off.
If both buttons_are visible,_then_it's very straightforward_however,_depending on_where I am in the app, the_right button_might not be visible.  When_it's not visible, I_use_View.GONE.  The problem is that_the text now fills the remaining_space, which is desired, but_centres_in_that remaining space, not within_the display width so that a_short piece of_text is offset to the right by_the_width of the first button.
Using View.INVISIBLE_rather_than View.GONE is not the answer_as_the_text then centres correctly but_doesn't use the available space to_minimise the shortening of the text.
Here's the effect I'm_trying to achieve:
Both_buttons visible:
---------------------------------------------------------------
| Left button |__Title_text centred in display | Right button |
---------------------------------------------------------------

Right button hidden
---------------------------------------------------------------
|_Left button_|  Title_text centred in display      _      _  |
---------------------------------------------------------------

Right button hidden with long text showing elipsis. _This is what I'm looking for.
---------------------------------------------------------------
| Left button_|  A really long piece of_title text centred...|
---------------------------------------------------------------

Here's what