Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

a href tag getting 0 height inspite of the attribute being declared

All,

On my website www.coutallure.com

There is a 'forgot password' div thats sitting right underneath the 'password' field at the bottom of the page.

Now, even though, I have specified the height & width of the div (id: fpass), the 'a href' tag inside this div doesnt inherit the height from the parent div (fpass).

I have specified the height & width of the 'a href' tag as well and as per the firebug, the height & width is being taken into consideration by the browser, however still, the height of the 'a href' tag remains zero!

Can anyone please enlighten me why this is the way it is, i.e. the height & width of the 'a href' tag is not the actual height & width being used by the browser?

like image 986
Kayote Avatar asked Oct 23 '25 22:10

Kayote


1 Answers

An a element is inline by default, add display: block to make it listen to its dimensions.

An inline element won't listen to its dimensions set with CSS.

jsFiddle.

like image 154
alex Avatar answered Oct 26 '25 11:10

alex