Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7775319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:36:02+00:00 2026-06-01T17:36:02+00:00

So I have this certain table. I know I’m not supposed to use table

  • 0

So I have this certain table. I know I’m not supposed to use table for layout, but in this case I’m forced to.

I need to style a specific TD’s cell-spacing (the TD with the class .ritey). I know I have to target the TABLE to set its cell-spacing, but I don’t want other TDs got affected. I only need to style this single TD.

Is there any way to do this?

Here is a quick rough sketch with MS Paint, I hope this explains what I need:

In the overall layout there will be multiple rows (multiple TR). In this question I only show one row. I need all columns (all TDs) to remain unchanged, except for .ritey. I want .ritey to have 10px margin around it (margin, not padding). I hope this explains better!

.

And here is what I got in my HTML. I tried td.ritey { border-spacing:10px; } but it does not seem to work.

  <table width='100%' border='0' cellspacing='1' cellpadding='3' class='postable'>
  <tr>
  <td valign='middle' class='row4 uname' colspan='2'>
  <div class='name'>
   <a href='#'>Guest</a>
  </div>
  </td>
  </tr><tr>
  <td width='100%' valign='top' class='ritey'>
        <div class='postcolor'>
         Post content
        </div>
  </td><td valign='top' class='lefty'>
    <div class='postdetails'>
    Details
</div>
  </td>
  </tr></table>

Any help is really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:36:04+00:00Added an answer on June 1, 2026 at 5:36 pm

    See fiddle for code and demo

    fiddle: http://jsfiddle.net/kDKEw/2/

    demo: http://jsfiddle.net/kDKEw/2/embedded/result/

    HTML:

    <table cellspacing="1" cellpadding="3" border="1" width="100%" class="postable">
      <tbody><tr>
      <td valign="middle" colspan="2" class="row4 uname">
      <div class="name">
       <a href="#">Guest</a>
      </div>
      </td>
      </tr><tr style="height: 36px;">
      <td width="100%" valign="top" class="ritey" style="width: 90%; position: absolute; margin: 4px;">
            <div class="postcolor">
             Post content
            </div>
      </td><td valign="top" class="lefty" style="float: right; width: 6%;">
        <div class="postdetails">
        Details
    </div>
      </td>
      </tr>
    </tbody>
    </table>
    

    SS:

    enter image description here

    Updated Fiddle as per image illustration ( https://i.stack.imgur.com/YBXCK.png ): given by deathlock

    Fiddle: http://jsfiddle.net/7xfxF/1/

    Demo: http://jsfiddle.net/7xfxF/1/embedded/result/

    SS:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to replace a string in certain documents. I have googled this code,
First of all I know this is probably bad sql but I just need
I need to know the number of rows in a certain table. If it
I can update some tables just fine, but a certain table I have cannot
I have this method which does certain checks and applies a color code on
This is for certain a newbie mistake, I have googled for plenty of hours
I have a generated txt file. This file has certain lines that are superfluous,
I have a tree view representing certain items. This tree is always two levels
I have setup my windows in a certain way. How do I save this
I have a contextmenu that shows on certain elements when you right click. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.