Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table pasted from Word - override with style 1

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
0
0
GB
Having pasted a table from Word into Frontpage, I want to apply styles contained in a CSS to the table. It works inasmuch as, for example, the text colour changes to what I would expect but the borders do not.

It's as if the properties previously assigned to the table/cell borders are overriding those attached to the styles I have selected. Is there an easy way to overcome this?

The only alternative I can see is to create a new table in FrontPage using the styles I want then paste text cell by cell from the Word table - not a pleasant prospect given that I have to do this for lots of tables in lots of different HTML pages.

Thanks in advance.
 
Can you post the URL of the page with the table in question.

CSS does work in a sort of downline fashion. Styles in a external style sheet are over ridden by styles in the head section. Head section or external style sheet CSS is over ridden by inline styles or attributes in the HTML.

If your table tag has border="#blah" in the table tag, then the table border styles in your style sheet are void for this table, the browser will interpret the inline border attribute as the final word - so to speak.

If this is what is going on with your table, your best bet is to remove any formatting you have inline on the table to allow the CSS to work for that table. I would first suggest that you try highlighting the whole table on the page in Normal view and pres Ctrl+Shift+Z or choose Remove Formatting from the Format menu in FP.

HTH
Tiffany

Microsoft MVP - FrontPage
 
Tiffany - thanks, I was not aware of the Remove Formatting option so please have a star on me. That makes life a lot easier. The 'border blah' stuff still appears in the table html but I can remove that in HTML view. I still get very strange behaviour with borders in general with borders appearing when I specify none in the style but I will soldier on.

 
Thanks Tiffany.

I just wish there was an equivalent to 'Remove Formatting' for borders. I think I may write some VB to 'strip borders' so that all cell borders are removed from the HTML. I was experimenting with convert to text in Word then back to table in FrontPage but FrontPage doesn't appear to allow you to specify a column delimiter.
 
My mistake - I have been working with two versions of FrontPage and it appears that FP 2002 does support column delimiters (but 2000 does not). So, if I:

a) Select the table in Word.
b) Convert table to text using suitable delimiter.
c) Copy the text and paste into FrontPage.
d) Convert text to table using same delimeter.
e) Then remove all formatting
f) Apply styles from CSS

...then I think I may be on to something!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top