X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

Minimize/Maximize//Close buttons, i need to disable them

Posted

I tried everything, installed ChromeEdit plus and inserted the code i found on this forum and nothing happened. I have firefox mozilla 18 at the moment and windows 7. And i didn't find UserChrome.css and UserContent.css file but this ChromeEdit tool creates those 2 files, so i looked into profile files and in chrome folder this 2 files are empty so i just need the right code.

Chosen solution

This is the one:

#titlebar {display: none !important;}
#main-window {-moz-appearance:none !important;}

i found it somewhere on forum. It was so painful, but finally i made it. Don't know how to thank you, you are very helpful and you know how to help.

Thanks again!

Read this answer in context 1

Additional System Details

Installed Plug-ins

  • Next Generation Java Plug-in 10.11.2 for Mozilla browsers
  • Google Update
  • 5.1.10411.0
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.3
  • VLC media player Web Plugin 2.0.0-rc
  • Shockwave Flash 11.1 r102
  • GEPlugin

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0

More Information

iamjayakumars
  • Top 10 Contributor
418 solutions 4938 answers

Check with Firefox Addons

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

#autohide-context { display:none!important; } /* hide "Exit Full Screen Mode" */
#window-controls  { display:none!important; } /* hide window controls */

The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.

Question owner

Thanks cor-el for reply,

bu this still didn't solve my problem. I copied this code into userChrome.css in folder chrome and nothing happened. I know this code worked for older versions of mozilla but i need to find solution for this one. I think i need entire code, can you help me with this? I found some on other forums but still didn't manage to run it properly.

Thanks

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

Does other code in the userChrome.css file work?

See http://kb.mozillazine.org/Editing_configuration/Troubleshooting

Make sure that the File name is userChrome.css (case sensitive) and doesn't have a hidden .txt appended (file type is Cascading Stylesheet and not Text Document).

You can use this button to go to the Firefox profile folder:

  • Help > Troubleshooting Information > Profile Directory: Show Folder

Question owner

Yes everything is perfect, i have a Chrome edit plus tool which create this file automatically. Tried also some other code but it doesn't work... I need whole code or i can just insert some sections of code?

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

You said this is needed only once. If i am correct this should already be there?

Question owner

This code works perfectly:

menu, menuitem {

 font-size: 32px !important;

}

So it is something wrong with code you posted. Can you somehow customize it? Thanks for help again.

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

Can you post the content of the userChrome.css file?

Question owner

If i understand you, the userChrome.css file is empty at the moment. If i insert this code: menu, menuitem {font-size: 32px !important;} I have bigger menu in browser.

Question owner

But i need your code to work.

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* What is the meaning of this?*/

#autohide-context { display:none!important; } /* this one hide exit and full screen buttons? */

#window-controls  { display:none!important; } /*this one hide window controls */

must be # at the beginning and @. Sorry i don't know nothing about code it self, i don't understand it. I just want to find solution. you are very helpful, thanks.


Ps: i don't know why number 1 is there, in code is #

Modified by cor-el

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

Helpful Reply

Note that this code only works in full screen mode (F11) and doesn't hide the close button in normal mode.

For normal mode, you can try this code.

#titlebar-buttonbox-container { display:none!important; }

Question owner

Aha, thanks for Full screen mode, it is working now, but this code for normal mode isn't. unfortunately i need code for normal mode. I would like to set resolution of mozilla, dont want full window and then insert a code so no one could close minimize or maximize the windows. Is this even possible? Do you have any other code? Thank you.

Modified by lukc18

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

I'm on Linux, so can't really check the code for Windows.
The code that I posted works for me in a Firefox version that runs under Wine.

You can try to use the DOM Inspector to check which selector to use for the three buttons on the title bar.

The DOM Inspector (DOMi) has a menu item (Edit > Select Element By Click) and a toolbar button "Find a node to inspect by clicking on it" (left icon on the toolbar in the DOMi).

  • open the browser window in the DOMi (File > Inspect Chrome Document) and choose the first from the list.
  • click the "Find a node to inspect by clicking on it" button and use the keyboard (Alt Tab) or the Task bar to go back to the browser window (do not click in the browser window other than the title bar).
  • click that element with the mouse and keep the button pressed until you see a red border to indicate the the DOMi has located that element in the DOM tree.

Modified by cor-el

Question owner

I managed to install DOMi, i also managed to find a node by inspecting with clicks. But when i clicked on close or maximize button nothing happened. When i click somewhere else(bookmarks or letters) its shows me a code, i can cut,edit this. But when i click on close, maximize, minimize buttons nothing happens.

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

If you can't select those buttons then you probably can't remove them, so you may be out of luck.

Can you attach a screenshot that shows the buttons?

Use a compressed image type like PNG or JPG to save the screenshot.

Question owner

Second image: clicked on minimize button but nothing happened

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

Does the code work if you hide the menu bar to get the orange Firefox menu button?

You now have the Windows title bar and you can't modify that bar.

Question owner

Looks like i can't modify this one to. It is the same with hidden menu bar. So i can't remove those buttons with userChrome.css? Do you have any other idea?

Chosen Solution

This is the one:

#titlebar {display: none !important;}
#main-window {-moz-appearance:none !important;}

i found it somewhere on forum. It was so painful, but finally i made it. Don't know how to thank you, you are very helpful and you know how to help.

Thanks again!

Modified by lukc18

j.val 0 solutions 2 answers

Dear luck18, I tried your solution in firefox 19.02 and still get the controls. This the full content of my userChrome.css file. Am I missing something?

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

#autohide-context { display:none!important; } /* hide context menuitem "Exit Full Screen Mode" */
#window-controls  { display:none!important; } /* hide window controls in full screen mode */
#titlebar {display: none !important;}
#main-window {-moz-appearance:none !important;}

Thanks in advance

Modified by cor-el

cor-el
  • Top 10 Contributor
  • Moderator
10783 solutions 97065 answers

In what mode (normal or full screen) are you running Firefox and do you have the Firefox menu button or the classic Firefox menu and the Windows title bar?

Can you attach a screenshot?

Use a compressed image type like PNG or JPG to save the screenshot.