Solved

vertical adjustment of table cell contents

Posted on 2011-03-08
3
189 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

707 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

14 Experts available now in Live!

Get 1:1 Help Now