training-dreamweaver - tables text alignment

Forum home » Delegate support and help forum » Dreamweaver Training and help » training-dreamweaver - Tables, Text alignment

training-dreamweaver - Tables, Text alignment

resolvedResolved · Low Priority · Version Standard

Simon has attended:
Dreamweaver 8 Introduction course
Access Intermediate course

Tables, Text alignment

I'm trying to edit an existing webpage and I'm having problems with text alignment. The page is in a table format, with people's names, job title & phone numbers in different cells. The text appears to be aligned properly while editing on Dreamweaver 8, but after uploading, the text is out of alignment. I'm very new to Dreamweaver and would appreciate your advice.
Thanks

RE: Tables, Text alignment

Hi Simon,

There are a number of ways to align text.

Firstly, in HTML, you can align a cell by applying the align parameter to the TD tag, like this:
<TD align="left">Content</TD>

To do this in design view of Dreamweaver, place the cursor in the cell, and check the Cell Alignment drop down box on the properties panel.

Secondly, you can align a section (P or DIV tag) by applying the align parameter to a DIV tag, like this:
<TD><DIV align="left">Content</DIV></TD>

To do this in Dreamweaver, it's also on the properties panel, but each alignment option is a button like you'd see on Microsoft Word. If you are in a Paragraph tag, it will attempt to align the paragraph, like this:
<TD><P align="left">Content</P></TD>

So also check your code to ensure there is no override of alignment of the TD tag.

Thirdly, you can set alignment in CSS definitions, and this could be done be redefining a HTML tag, like this:
CSS:
td { text-align: right; }
HTML:
<TD>Content</TD>

OR, as a class which is applied to the TD, DIV, P or other element, like this:
CSS:
.whatever { text-align: right; }
HTML:
<TD class="whatever">Content</TD>

Check all of these things, including your CSS definitions (either in an external linked .css file, and the top of your web page).

If this doesn't solve the problem, please reply with the URL of the page (if you're able to announce it publicly) and I'll have a look in more detail. Alternatively, you can e-mail the file to me, and if you need to do this, reply to this post and i'll supply you with the e-mail you can send it to.

See attachment graphic for difference in TD align and DIV align.

Regards, Rich

Attached files...

table_paragraph_cell_properties.gif

RE: Dreamweaver, Tables, Text alignment

Thanks for the useful advice - some of the alignment problems are also vertical rather than just horizontal - grateful for further advice?
Thanks

RE: Dreamweaver, Tables, Text alignment

Simon,

If it's alignment within a table cell, then you can use the 'vertical alignment' drop-down box as seen in the diagram attached to my previous post.

You can't really set vertical alignment to other elements such as P or DIV tags, as these are controlled by how much content comes before it. However, you can use CSS to control the exact layout of a page, to the exact pixel. eg. you can say 'this div tag must be 156 pixels down from the top of the page', and it will go there.

Hope this helps.
Rich

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Dreamweaver tip:

Paragraph formatting

in Dreamweaver if you type in text and press entre you get double line spacing.

To avoid this hold down the shift key and then press Enter for a soft break

View all Dreamweaver hints and tips


Server loaded in 0.09 secs.