Increase padding in table?

  • 1
  • Question
  • Updated 9 years ago
  • Answered
I have created a border around my posts in my blog. What I'd like to know is how to increase the space on the left hand side between the border and my text. Can anyone help me with this? This is code I have currently for making my table:

table border="3" bordercolor="#E4CEA4" width="500" cellpadding="3" cellspacing="0"

Table Cell

--!>

This is the screenshot:
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
  • just trying to figure it out

Posted 9 years ago

  • 1
Photo of Kershnee

Kershnee

  • 2087 Posts
  • 152 Reply Likes
Hi Littleus,

You can try this code:

<table border="3" bordercolor="#E4CEA4" width="500" cellpadding="3" cellspacing="0">
<tr>
<td style="padding-left:10px">Table Cell</td>
</tr>
</table>
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
shouldnt text be centered in a table? if text ran long on a line it would almost touch the right side making it look not centered? my opinion. Lee.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Yes... normally I would agree with you Lee - if they are just one sentence long. I am doing paragraph chunks. I believe that this would look better left-aligned. I just didn't want it so close to the edge. This helps to give my paragraph a more balanced look. Thanks for your input though.
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
ok - you know when i said centered i meant equally away from the borders on each side. The text could still be left aligned - It was more a question to kershnee on code code ethics. Lee
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Oh.. now I understand. But, for some reason, my text still appears to be very close to one edge than being centered in the middle. Is there a particular code that would enable the text to be centered equally as you suggest? Just wondering.
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
did you remove the padding-left: 10 ?
If you use the code you gave first and change the padding value to 10 or 20 you should see the text is moved in on each side of the border.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Ahh.. that worked perfectly! I was able to figure out the padding-left thing but didn't know how to frame it. Thanks so much! You're awesome!