Click to See Complete Forum and Search --> : valign text?


chrisb
05-25-2007, 09:20 AM
Hi Guys,

Quick one. I'm trying to valign the text in this class to the middle, but whatever I do I can't seem to manage it.

Would anyone be able to help please. I'm happy where my images sit, but want the text in the middle


<style>
.nav_one {
margin-left: 5px;
width:782px;
color: #6599C9;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
vertical-align: text-top;
border: 1px solid #CCCCCC;
}
</style>
</head>

<body>
<span class="nav_one"><img src="images/rss_logo.jpg"> RSS News | <img src="images/rss_logo.jpg"> RSS Sport</span>
</body>
</html>



Thanks

Chris

ray326
05-25-2007, 04:55 PM
http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-vertical-align

For one thing there's nothing to "align" to or within.

chrisb
05-25-2007, 07:14 PM
Sorry, but I dont understand. I have looked at this page already and tried 'vertical-align' to the top with no avail??

Thanks

Chris

ray326
05-26-2007, 11:50 AM
There's nothing to vertical-align against. At the very least you need to put that inside a div.

cliffycoder
05-27-2007, 07:08 PM
style="vertical-align:middle;" to the img tags

Andy

Centauri
05-27-2007, 10:39 PM
You can set the line-height of .nav_one to be equal to the height of the images.