DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy

tips:button_align

This is an old revision of the document!


How to align a <button> element?

How to align a <button> element inside a <fieldset> with CSS? (E.g. you use the bureaucracy plugin.)

One way is to set the CSS property “text-align” of a tag which wraps the button tag. But this take effect to other inline elements (e.g. text) too:

.dokuwiki form.bureaucracy__plugin fieldset {
   text-align: center;
}

An alternative without side-effects on other elements and with more flexibility is to redefine <button> to a block element 1) und than you can apply the margin property. The following CSS rule centered only the button and nothing else:

.dokuwiki form.bureaucracy__plugin button {
    display = block;
    margin = auto;
}
1)
The default display-property of a button tag is 'inline'.
tips/button_align.1495898316.txt.gz · Last modified: 2017-05-27 17:18 by Michaelsy