View Full Version : Table: How to control indentation space?

08-09-2005, 04:26 AM
Here's my problem, I made a table and I can't control the indentation. When you insert texts inside the table (cell) it is touching the borderline... I don't know any code except <blockquote> but whenever i'm using that code, it is too far from the borderline. I shouldn't use the &nbsp; code because my document has too many tables... i have to encode all of it... I also can't use a white picture inserted in the left side... that's not right at all... Is there other way?

I have an attachment: Table_indent copy.gif it shows what happened in my table... what i need is to place the text Like a margin in the redline in the illustration, instead of where it is... because it is too far the border when indented and it is touching the border when not indented. I know it is easy for you... but i simply don't know how to control the indentation. Another question... is the code for that can also be used outside the table because i have to make a paragraph like webpages (as if i'm using Pagemaker or Word)?


08-09-2005, 09:39 AM
I can really give only one proper answer: learn Cascading Style Sheets (CSS).
HTML Dog (http://htmldog.com/) is a good starting place to get to grips with the basics; in the HTML&CSS Documentation & References (http://www.codingforums.com/showthread.php?t=20862) sticky on top of this forum you can find a plethora of other references and resources.

Your indentation issue can easily be resolved by using the CSS margin or padding properties; either set an amount of padding on the table cells themselves, or set a margin on appropriate elements used inside the table cells to mark up the content (like the p element you've used).

It should be noted that using the blockquote element simply because it has a default left indentation is not the preferred way of marking up content; for these presentational aspects, CSS was designed.
Without seeing the actual page and/or markup I can only guess, but it looks like you're still inappropriately using tables for layout purposes; as you've already experienced, this practice usually creates more problems then it solves. Again, I strongly recommend learning CSS and proper HTML markup.

08-10-2005, 02:22 AM
thanks for the link! i'll try to read those when i have time, but in the meantime i'll use "cellpadding" I know according to that link, I should use CSS instead... but i don't have enough time to study CSS...

ok thanks again Ronald.