CSS Within <script></script> ?

JDX7913
Tera Guru

Is it possible to have CSS within a script tag of an HTML?

I am trying to create a table within a modal e.g.

<script type="text/ng-template" id="modalTable">
 //Table code with CSS...
</script>

I know I can use inline tags e.g. and that would do the job.

<script type="text/ng-template" id="modalTable">
      <table class="table table-bordered table-striped">
           ///Stuff....
      </table>
</script>

But if I want more customization I would need CSS to work. 

I tried to do the regular CSS within the modal

<div class="myCSS"></div>

But it would not load and it would not display in the Chome DevTools inspection. 

1 ACCEPTED SOLUTION

surajp
Mega Guru

HI,

 

1) Create a record in Styles from Content Management. 

 

2) In UI page add this line to include the css stylesheet, use sys_id of stylesheet record in href.

 

<link href="19b311334f903200fc11fa218110c72f.cssdbx" rel="stylesheet" type="text/css"></link>

 

Mark correct/helpful if this helps.

 

Regards,

Suraj

View solution in original post

3 REPLIES 3

surajp
Mega Guru

HI,

 

1) Create a record in Styles from Content Management. 

 

2) In UI page add this line to include the css stylesheet, use sys_id of stylesheet record in href.

 

<link href="19b311334f903200fc11fa218110c72f.cssdbx" rel="stylesheet" type="text/css"></link>

 

Mark correct/helpful if this helps.

 

Regards,

Suraj

JDX7913
Tera Guru
I was able to achieve what I was aiming for by putting the CSS in the

Hi,

Thanks for replying.

Please not you have marked your comment as correct. It would be helpful if you mark may comment/answer as helpful.

 

Regards,

Suraj