Solved

vertical adjustment of table cell contents

Posted on 2011-03-08
3
199 Views
Last Modified: 2012-05-11
I have two table cells as shown:

<td align="right" valign="top">Sample Label</td>
<td valign="top">....nested tables in here....</td>

Open in new window


The problem is that my Sample Label aligns too high relative to the other cell. When I change valign to "middle" it goes too low. Is there a style I can apply that will precisely bring it down 3 or 4 pixels? I've tried some things and nothing works.
0
Comment
Question by:SweatCoder
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
McOz earned 500 total points
ID: 35074537
Have you tried:

padding-top: 2px;

adjust to whatever looks good...

Cheers
0
 
LVL 9

Expert Comment

by:McOz
ID: 35074574
I should add, you need to keep it as valign="top" for the top padding to work as expected.

Good luck!
0
 
LVL 11

Author Closing Comment

by:SweatCoder
ID: 35074773
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help in CSS 5 45
Syntax Error 2 42
P tag not forcing line space 2 22
Wrapper for APPs 9 20
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now