Forum Moderators: not2easy

Message Too Old, No Replies

adjusting the vertical alignment of inline elements

         

thesheep

6:45 pm on Aug 5, 2004 (gmt 0)

10+ Year Member



I've got an image, then an unordered list all inline forming my nav bar at the top of the page.

The link text in the <ul> comes slightly too low relative to the image. How can I push it up a bit?

Adding padding or margin to the bottom of the <a> elements or their containing <li> or <ul> elements doesn't move them.

Thanks,

createErrorMsg

7:52 pm on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could try giving the <a>nchor tags a line-height. This will adjust how they sit in the box by altering the height of the box and changing the exact location of vertical center to match.

Make sense?

thesheep

3:17 pm on Aug 7, 2004 (gmt 0)

10+ Year Member



OK thanks.

Another thing. How do I style a <select> element in a form? Changing the border attribute with css doesn't seem to do anything.

select { border: 1px solid red; }

createErrorMsg

8:49 pm on Aug 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What about applying a class to the <select>?

css:
.formselect {
border: 1px solid red;
}

html:
<select class="formselect">blah</select>

I have no idea if this will work, but you can try.