Different tabels and more CSS

Questions about XML that are not covered by the other forums should go here.
Mario777
Posts: 4

Different tabels and more CSS

Tue Apr 15, 2014 11:31 pm

Hi!
I have to adapt a XML and XSL file.
Usually there was the CSS just for one table in my XSL, but I want to have different tabels classes to change their lookings.

In my XML file i call the tabels:

Code: Select all

    <table class="first">....
   
    <table class="second">....


In my XSL I have predefined for all tabels this:

Code: Select all

    .section_table {
      width: 100%;
    }
   
    .section_table tr td {
       width: 100%;
    }


How can I adapt this code to make my tabels look different?

Thank you!
iulian_velea
Posts: 63

Re: Different tabels and more CSS

Wed Apr 16, 2014 12:33 pm

Hello Mario,

When loading the CSS file, Oxygen does not interpret the rules .class_attribute_value the way a browser does.
So if you want to differentiate between your two tables in the CSS you can use something like the following two rules, where you can see that the attribute class and its value must be clearly specified:

Code: Select all

table[class="first"] {
      border: 1px solid blue;
}

table[class="second"] {
      border: 1px solid red;
}


Best regards,
Iulian

--
Iulian Velea
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Mario777
Posts: 4

Re: Different tabels and more CSS

Thu Apr 17, 2014 4:26 pm

Thank you very much. I implemented it a Little bit different, but it worked! :)

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests