html - Using bottom with position relative? -
i trying series of <a> tags appear @ base of parent <li>.
the problem 2 fold. if use position: relative, bottom: 0; has no effect. if use position: absolute, <li>'s have overlapping widths.
i can fix first problem using top style, not ideal text size unknown, , top element measure top of both elements (so base of element not hit base unless knew font size).
i can fix second defined widths, add unwanted white space on elements shorter titles.
try bit of css:
#main-menu li a{ display: table-cell; position: relative; vertical-align: bottom; height: 111px; } jsfiddle of working style
Comments
Post a Comment