css selectors - CSS - How to select nth-child of form element? -


i trying re-design registration form of wp website. add exta fields. increase width of <form> container , set <input> field's flow left. want set flow of phone field (which third child of <form> element) none i.e. float: none;. try this: form:nth-child(3) {float: none;} seen not working. selects form rather 3rd field of form. wrong?

here registration page of site. please help.

you need include descendant combinator (the space):

form :nth-child(3) {     /* css */ } 

without space, you're selecting form-element if it's third-child of parent, space you're selecting third-child elements of form. elements direct descendants:

form > :nth-child(3) {     /* css */ } 

reference:


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -