Solved

vertical adjustment of table cell contents

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make Line Items Look Good Over Mobile 2 61
Changing Color of Page Section 4 21
Box Locations 6 16
Flex container exceeding stated width in IE11 4 6
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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 …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

777 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