Search
  • Input Button: Text not underlined when hovered..?

    Date: Sep 29, 2010  |  Categories: Css  |  Written By: Mike Ballan  

Doing some bug fixing today I came across this little problem and could not for the life of me work out why it wasn’t putting an underline on my Submit button so I did what I always do in these cases and search online and guess what? It turns out that all you need to fix this problem is to add in a simple display attribution to the Css of the Submit button like so:

This is what I had first but this didn’t work.

input {
	text-decoration:underline;
}

But this fixes the problem

input {
	text-decoration:underline;
	display:inline-block;
}

You can use any of the below instead of the “inline-block” but it seemed to work the best for me.

input {
	text-decoration:underline;
	float:left;
}
input {
	text-decoration:underline;
	display:block;
}
input {
	text-decoration:underline;
	position:absolute;
}
Tags:  |  | 


2 Responses to “Input Button: Text not underlined when hovered..?”

  1. Asen Alexandrov Says:

    Hello, Mike,
    You are a savior! 10x alot!
    Best regards,
    Asen

  2. Mike Ballan Says:

    Glad to be of help man..!

Leave a Reply

Back to Top