mboehler3 Posted August 25, 2009 Report Share Posted August 25, 2009 I am trying to align an image with text in my header... here is my page:I want the Customer Login to move down about 5-10 pixels so that is lines up with the text. I've tried adding padding and margins but it breaks onto two lines. What is the best way to go about doing this?Here is my CSS: .headerSubpages {margin: 0 auto; width:960px; height:104px; margin-bottom: 20px;}.headerLeftSubpages {width: 300px;float: left; }.headerSubpagesCenter {padding-top:40px; text-align:right;} And the HTML: <div class="headerSubpages"> <div class="headerLeftSubpages"><a href="http://<%= Request.ServerVariables("SERVER_NAME") %>/default.asp"><img src="/spsite/navigation/images/hg_splogo300.gif" width="300" height="104" border="0" align="left" /></a></div> <div class="headerSubpagesCenter">Need Assistance? 1.877.954.7873 / <a href="#">Free Payroll Quote</a> / <a href="#">Enroll Now</a> / <img src="/spsite/navigation/images/headerCustomer_login.gif" /></div> </div> Thank you for your help, Link to comment Share on other sites More sharing options...
chibineku Posted August 25, 2009 Report Share Posted August 25, 2009 Why don't you move the text up so it sits in the middle using vertical-align: middle; ? Link to comment Share on other sites More sharing options...
mboehler3 Posted August 25, 2009 Author Report Share Posted August 25, 2009 Why don't you move the text up so it sits in the middle using vertical-align: middle; ?Thanks for the suggestion, but I added vertical-align:middle to .headerSubpagesCenter and there was no change on the page. Link to comment Share on other sites More sharing options...
mboehler3 Posted August 25, 2009 Author Report Share Posted August 25, 2009 Thanks for the suggestion, but I added vertical-align:middle to .headerSubpagesCenter and there was no change on the page.But I added this to the CSS: .headerSubpagesCenter img {vertical-align:middle;} And the image aligns now! Thank you for your help. Link to comment Share on other sites More sharing options...
chibineku Posted August 25, 2009 Report Share Posted August 25, 2009 (edited) Edit: ah, got there fast. Edited August 25, 2009 by chibineku Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now