I'm finding that the following css is not working:

<style>
.chorus {
  font-style: italic;
}

.chorus .altstyle {
  font-style: normal;
}
</style>

<p class="chorus">This bit is italic <span class="altstyle">this bit is NOT italic</span></p>

The whole thing is showing as italic do sub-classes not work?

Comments

amarslaksh’s picture

Hi Chunty,

I'm not facing any issue usin the same code...

or you can try this

.chorus { font-style: italic; } .chorus span { font-style: normal; }

This bit is italic this bit is NOT italic

killua99’s picture

Status: Active » Postponed (maintainer needs more info)

Hi @Chunty

Do you still have some problem with this setting? amarslaksh did you select the PHP code eval ?

chunty’s picture

@killua99

Yes I can't get the font style reset. Sub classes do work so for example:

.chorus {
font-style: italic;
}
.chorus span {
font-style: normal;
font-weight: bold;
}

Will render anything in the span as bold but the italic font-style is not reset.

I've also noted that I selected the wrong version number when I filed this issue. I'm actually using 7.x-1.3 not 7.x-1.0-beta1 so I've correct that. @amarslaksh should I be using the dev version to solve this problem?

Ta
Chris

chunty’s picture

Version: 7.x-1.0-beta1 » 7.x-1.3
milos.kroulik’s picture

amarslaksh, can you, please, elaborate more about what version and settings you used to make this work?

amarslaksh’s picture

@ milos.kroulik

I'm using Drupal 7.14 version

chunty’s picture

Do you mean 7.x-1.3 or 7.x-1.dev or 7.x-2.dev version

Thanks
Chris

vegansupreme’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
Related issues: +#1664512: How do I apply CSS styles to the output?

The underlying library that Views PDF uses for generating PDFs has only limited support for CSS. If some styles are working, but others aren't it's likely because of TCPDF. Newer versions of TCPDF may support more CSS, so try updating to the latest TCPDF.