Skip to main content
Inspiring
Jan 10, 2008 7:31 PM UTC
Question

CSS for Tables

Is CSS for tables missing from RH? They don't even show when I manually add them.
This topic is closed to new replies. Start a new post to keep the conversation going.

12 replies

Peter Grainge
Community Expert
Community Expert
Jul 29, 2008 9:26 AM UTC
Welcome to the forum

You have to smile. Nothing on these forums about TH for months, maybe years, then the day after I post something in another thread, another question comes along. I'd put money on another post each day now for the next week or so. :-)

Set up a table as a test and what you should see is the row will appear but it will not work as a table header row should.

Translate
Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Peter Grainge
Community Expert
Community Expert
Jan 16, 2008 9:19 AM UTC
It looks as if the above will override any existing table borders but not cell borders.

In short, on a table with no borders already defined, CSS works but any inline styles already applied will remain, which is the way CSS works.

Translate
Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Peter Grainge
Community Expert
Community Expert
Jan 16, 2008 9:08 AM UTC
Let's correct things here. It was the case up to and including RH6 that you could not define tables in the CSS.

Add this to your style sheet.

Table.thinborder {
/* margin: auto auto;*/
border-collapse: collapse;
border: 1px solid #FF6347;

}
.thinborder td{
border: 1px solid #FF6347;
padding: 5px;

}

Amend the table tag to

<table class=thinborder

Works for me in RH7.

That was done to a new table where I first removed all borders. More testing later.

Translate
Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Participant
Jul 29, 2008 8:33 AM UTC
Hello I am new to RoboHelp 7 and I 've ben following the forum about tables and CSS.
Is there anything bew about Table accessing css classes without extra coding?

Thanks
Translate
Participant
Jul 29, 2008 8:36 AM UTC
Does Robohelp support the th tag?
anyone?
Translate
Peter Grainge
Community Expert
Community Expert
Jan 11, 2008 6:40 PM UTC
That is just saying that CSS files are supported. However, it has always been the case you cannot define your tables in the CSS file.

Translate
Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Peter Grainge
Community Expert
Community Expert
Jan 11, 2008 5:06 PM UTC
I don't see any reference to class= in the formatting of the tables. Is it not all inline styling in a RH7 generated table?

Translate
Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
jim_dAuthor
Inspiring
Jan 11, 2008 6:28 PM UTC
You have to look in the HTML source for the RH 7 Help files not the tables generated in the application. I would send the snippet but I don't have RH on my system connected to the internet.

Help > Contents & Index > Projects > Source Files
Translate
Peter Grainge
Community Expert
Community Expert
Jan 11, 2008 6:55 AM UTC
I don't think you will be able to create tables using styles from the CSS, much less alter existing ones. Using an alternative such as DW will work but then you will lose some of RH's functionality, such as dropdowns, simple creation of links etc as opening the topic again in RH will alter your code.

Translate
Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
jim_dAuthor
Inspiring
Jan 11, 2008 4:54 PM UTC
Thx for your insight.

I was curious and looked at the HTML source for a RH Help page with a table. They are using CSS for table formatting. I added their CSS to my CSS file but the styles still don't show in the style list.
Translate
jim_dAuthor
Inspiring
Jan 11, 2008 6:38 AM UTC
The tables already exist. I would like to format them using CSS. Is there another way to make one change and have it reflected throughout a project?

I guess I could link my files to another editor instead of the RoboHelp HTML editor.


Translate
MergeThis
Inspiring
Jan 10, 2008 8:42 PM UTC
I think we'll need more from you. What type of things are you looking to do in these tables?

In RH, it's often much easier to simply copy one of the RH table templates and modify it to suit your needs. Come back with some info.

Good luck,
Leon
Translate