Question:
How do I align text so it isnt squished against table border in
?
invizible2radar
2009-07-19 14:55:14 UTC
Hi i've made a website, half made with css and half with html.

Now the problem i've come across is that the text I have within a
table is squished against the left table border too much and there is no space at all between the left border and the text. It would be nice to have a couple of milimeters space or margin in between the left hand side border and the rows of text (which i've set to align left obviously).

The issue isn't as bad on the right hand side but it mainly needs a bit of margin to the left to look normal.

I have tried different css codes I've found online, using margin etc but nothing has worked as of yet.

I'll really appreciate your answers
Thanks
Three answers:
2009-07-19 15:35:28 UTC
In a table you have 2 options.

First is to use cell padding add it to the table properties line, start from 2 and work upwards: cellpadding="2"

However this puts a margin at all sides of the cell.



Second you could add a non breaking space at the front of each line of test:   You can repeat this as many times as you want.
2009-07-19 15:05:24 UTC
Unless the data is tabular, don't use tables. Put the text where you want it using CSS. (Put it in a span, and you can move it anywhere.)
=]]]]
2009-07-19 15:03:30 UTC
all you do is
and write something in the middle and put
at the end


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...