Home > Web Front-end > HTML Tutorial > A button is embedded in the link tag in jsp. The css of the button is to introduce an image. How to make the button appear vertically centered_html/css_WEB-ITnose

A button is embedded in the link tag in jsp. The css of the button is to introduce an image. How to make the button appear vertically centered_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:37
Original
1725 people have browsed it

A button is embedded in the link tag in jsp. The css of the button is to introduce an image. How to make the button appear vertically centered? ?
The question is how to center the button vertically? ? Now vertically on top
Here is the current code.

<a href="" ><input type="button"  id="login"  value=""></a>
Copy after login

Here is what the problem looks like now


Reply to discussion (solution)

Picture Relative positioning, or direct padding-top:10px;

Your text needs to be moved down. . The style introduces the picture: background:url(......) center center no-repeat; it is centered on the left, right, top and bottom

Why do you put input in the a tag?

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template