question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Center class not working for a nested button

See original GitHub issue

Description

When a Submit button is a child to a div with class row the class center is giving the same result as class left whereas right works perfectly fine.

Repro Steps

make a submit button a child to div tag.

<div class="row">
    <button class="btn waves-effect waves-light center" type="submit" name="action">Submit
        <i class="material-icons right">send</i>
    </button>
</div>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielRufcommented, Mar 29, 2017

The class .center just applies text-align: center. For floating I see just .left and .right here.

Try using .center-align or .center on the .row (the parent element / wrapper).

See here

1reaction
DanielRufcommented, Mar 30, 2017

You forgot to remove the right class: http://codepen.io/anon/pen/peQagE

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't click on button element when nested inside of Div's?
I have a button nested inside of ...
Read more >
Is it possible to centre a <table> nested in a <td> using CSS?
Is it possible to centre a <table> nested in a <td> using CSS alone and no HTML attributes. It needs to work in...
Read more >
CSS · Bootstrap
Note that, due to padding and more, neither container is nestable. Use .container for a responsive fixed width container. <div class="container"> ...
Read more >
Cascade, specificity, and inheritance - Learn web development
Often, the problem is that you create two rules that apply different ... We have then added the class special to the second...
Read more >
Selectors - W3C
Note: If an element has multiple class attributes, their values must be concatenated with spaces between the values before searching for the class....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found