DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:button_align

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tips:button_align [2017-05-27 17:18]
Michaelsy created
tips:button_align [2017-05-27 22:00] (current)
88.78.7.121
Line 3: Line 3:
 How to align a <button> element inside a <fieldset> with CSS? (E.g. you use the [[:plugin:bureaucracy|bureaucracy plugin]].) How to align a <button> element inside a <fieldset> with CSS? (E.g. you use the [[:plugin:bureaucracy|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:+One way is to set the CSS property "text-align" of a tag which wraps the button tag:
  
 <code css> <code css>
Line 11: Line 11:
 </code> </code>
  
 +But this solution takes effect to other inline elements inside the fieldset (e.g. text) too. :-(
  
-An alternative without side-effects on other elements and with more flexibility is to redefine <button> to a block element ((The default display-property of a button tag is 'inline'.)) und than you can apply the margin property. The following CSS rule centered only the button and nothing else:+An alternative without side-effects on other elements and with more flexibility is to redefine <button> to a block element ((By default the display-property of a button tag is 'inline'.)) und than you can apply the margin property. The following CSS rule centered only the button and nothing else:
  
 <code css> <code css>
Line 20: Line 21:
 } }
 </code> </code>
 +
  
  
tips/button_align.txt ยท Last modified: 2017-05-27 22:00 by 88.78.7.121