• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I can't apply a style to a snippet

Explorer ,
Jul 16, 2024 Jul 16, 2024

Copy link to clipboard

Copied

I can't figure out what I'm doing wrong. I have a snippet that contains a paragraph and a table.

I'd like to bold the header row in the table, but when I select the text and try to bold it, nothing happens. Manually added the <strong> tag to the html doesn't work either. I've looked at the default.css, and I can't spot the issue.

 

Any help is greatly appreciated!!!

 

Screenshot 2024-07-16 at 1.12.00 PM.png

 

2024-07-16_13-18-50.pngScreenshot 2024-07-16 at 1.12.15 PM.png 

Views

197

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

You say 'header row', but I only see <td> elements in your code. There are no <th> elements, which are used to indicate table header cells.

 

i.e. it should be

 

[...]

</colgroup>

<tbody>

  <tr>

     <th colspan="2" valign="top">

       <p>...</p>

     </th>

  </tr>

...

 

Most CSS stylesheets tend to already bold header rows by applying styles to th elements.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

The content I'm dealing with now is in the header row, but the problem is that I cannot bold any content in any row.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 18, 2024 Jul 18, 2024

Copy link to clipboard

Copied

I don't have access to your stylesheet, but my best guess is that another style is overriding the font-weight.

To test this, define a new style and apply it to see if anything happens.

 

Example:

Add to the bottom of default.css

.bold_test {

  font-weight: bold;

  color: red;

}

 

Apply it to 'Transaction_type' :

<p><span class="bold_test">Transaction_type</span>...</p>

 

If that does not work, try to force the style by applying !important to the style in the stylesheet and specifying that it is for a <span>:

 

span.bold_test {

  font-weight: bold !important;

  color: red !important;

}

 

If that works, that means some style is overriding your bold in the stylesheet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2024 Jul 18, 2024

Copy link to clipboard

Copied

In HTML Header Row is a specific tag. It looks like you simply mean the top row. That is not the same thing.

 

However you define the first row though, it should be possible to bold the content. I just created a table in a snippet, put text in the cells of the first row, selected the tr breadcrumb and then pressed CTRL B. Bold was applied to all the text. I was also able to apply bold to individual cells or words.

 

Try a new snippet to test.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

 

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

LATEST

If you can successfully apply bold to text in the regular paragraph above the table, perhaps you have a complex selector which specifically sets paragraphs inside table cells to normal weight.

 

I can't say exactly what might be set, because of the cascading nature of css, but look for something like:

 

td p {

    font-weight: normal;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp