Jump to content

Spacing text vertically in a cell

Recommended Posts

I still do not have a handle on this, and it should be second nature by now, but would someone please explain the rule when spacing styled text vertically within a cell (using an external style sheet). I have been advised not to use "padding-top:" , but instead use "margin-top:" , but it has no effect. I simply wish to move the text downward 142 pixels. Here is the style sheet code:

.const-copy {	font-family: Arial;	font-size: 15px;	line-height: 18px;	padding-right: 425px;	margin-top: 142;	text-align: left;	letter-spacing: 0px;	color: #555555;	background-image: url(images/zen_main-tile.gif);    background-position: top left;	background-repeat: no-repeat;}

And here is a look at the web page.View Website

Link to post
Share on other sites

I think because you are using tables instead of divs it might have something to do with it. From what i have learned here using tables is the 'old fashon' way to build a website. In fact i dont even know the correct use of tables due to CSS.You would put the width, align, and others in the style sheet instead of in the html code like you would with tables.even the 'body {}' would just go in the style sheet Also, instead of writing:

margin-left: 0px;	margin-top: 0px;	margin-right: 0px;	margin-bottom: 0px;

Just put

margin: 0px;

so you dont have to type it all out.

Link to post
Share on other sites

tables are only frowned upon when they aren't used for what they are intended for, which is displaying tabular data. The same concept for using a table applies for a div. You need to create the markup tags for it using HTML, and then CSS can be used to style it. CSS didn't replace tables, as it's not a substitute for markup, and vice-versa. The point is they work hand-in-hand.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...