Topic on Project:Support desk

How do I keep a mediawiki div element centered horizontally?

5
209.6.197.188 (talkcontribs)

I cant get this div to stay centered in my mediawiki wiki. Is thre a way to do this? the code above doesnt do anything. it just stays in place. Itried using a method that has workd efore. Is there anything special I need to do when modifying mediawiki div's?

       #searchInput {
        width: 50%;
       height: 40px;
       z-index: 1000;
       border: 0;
       display: block;
       text-align: center;
       margin-left: 10px auto;
       margin-right: 10px auto;
       position: absolute;
       top: -12em !important;
       left: 1em !important;
       color: #FF7F27;
       background: transparent;
       font-size: 85%;
       -webkit-appearance: none;/* this should Work */

}

Ciencia Al Poder (talkcontribs)

There are probably other CSS rules applied that take precedence or overwrite yours.

You give a CSS selector, but you don't specify in what MediaWiki version this has been tested, in what skin, etc, so there's not enough information to reproduce the problem.

209.6.197.188 (talkcontribs)

im using the main.css file for monobook skin

209.6.197.188 (talkcontribs)

It should be the most recent verion. its running on laptop. i installed it with xampp

Subfader (talkcontribs)

Google "debug css".

Reply to "How do I keep a mediawiki div element centered horizontally?"