I am trying to build a contact form ( please see mockups - desktop and mobile). Couple of questions…
Is it possible to move/put label names within name, email and text field and make them disappear when user clicks and starts entering data? (same for mobile version…I guess :focus…?)
what would be the proper way to increase vertical spacing between name, email, text field and button?
I know that padding can be used or margin and may be setting a height on a container…?
Margin is the one to increse the space between the elements.
Padding increases space within the element.
Setting a height is generally a bad idea, keep things fluid.
Never make them disappear because a user will have no idea when reviewing a finished form if the data entered is the correct data for that field unless they delete the data and get the placeholder back. This is really annoying to the user and a nightmare when autocomplete has added all the data into the wrong fields and you have no way of checking if that is correct or not.
I am trying to implement your example in my contact form. It looks like position: absolute; has no effect even though I put position: relative; on the containers to create positioning context…
Sorry Paul I think I didn’t shape my thought correctly. What I mean is absolute is working yes you are right and I am able to move labels inside inputs by say setting position: absolute top: 20px; however translateY seem to have no effect…
Sorry Paul to bug you with this…certainly don’t wanna look like I am a lazy *** not doing my part…
I think Ray is right…but let me review again on my end. May be I am missing something. I deliberately commented out any padding or margins on my end and left only width values and positions relative/absolute and translate…
Oh no…just wanted to make sure my code is ok or may be something could have been done better. Yes it’s working fine on my end too.
I am thinking of adding a blog page to this site. I plan on using WordPress for that. I guess with regards to HTML and CSS I can ask questions here but WordPress ones I guess I should head out to WP forum on this site…?