Input type submit button not centered?

Web site design, graphics, logos, web development,templates design discussions.

Moderators: ushakumarik, DeviSri

Post Reply
Catherine
Posts: 36
Joined: Thu Apr 21, 2022 9:08 am
Contact:

Input type submit button not centered?

Post by Catherine »

Hi guys,

I've another problem. I tried to center the log in button but I couldn't get anything done. What have I done wrong?

CSS

.centerEverything {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
line-height: 2.5em;
}

input[type=submit] {
padding: 0.5em 1em;
cursor: pointer;
border: none;
border-radius: 0.2em;
}
Catherine
Posts: 36
Joined: Thu Apr 21, 2022 9:08 am
Contact:

Re: Input type submit button not centered?

Post by Catherine »

Alright,

I fixed it. I have an element floated left before it. So this caused the trouble.
User avatar
siteadmin
Site Admin
Posts: 335
Joined: Sun Dec 18, 2005 11:10 am
Contact:

Re: Input type submit button not centered?

Post by siteadmin »

or you can just add text-align: center in your main div.
Bella
Posts: 35
Joined: Wed Apr 13, 2022 6:27 am
Contact:

Re: Input type submit button not centered?

Post by Bella »

yeah, that's great idea.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest