Question about empty button top positioning.
-
hi i am new to html, i would like to ask in regards to button position in line eg:
.square{
height: 50px;
width: 50px;
background-color: powderblue;
}a
for the above simple code snippet, the button top is always not aligned whenever the button have no content. why is this so? and how do i fix this?
-
hi i am new to html, i would like to ask in regards to button position in line eg:
.square{
height: 50px;
width: 50px;
background-color: powderblue;
}a
for the above simple code snippet, the button top is always not aligned whenever the button have no content. why is this so? and how do i fix this?
Add
vertical-align
to your CSS rule to fix the problem..square {
height: 50px;
width: 50px;
background-color: powderblue;
vertical-align: top;
}Original: Edit fiddle - JSFiddle[^] Fixed: Edit fiddle - JSFiddle[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer