Different tabels and more CSS

Questions about XML that are not covered by the other forums should go here.
Mario777
Posts: 4
Joined: Fri Apr 04, 2014 2:32 pm

Different tabels and more CSS

Post by Mario777 »

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
Joined: Fri Dec 12, 2003 6:34 pm
Contact:

Re: Different tabels and more CSS

Post by iulian_velea »

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
Joined: Fri Apr 04, 2014 2:32 pm

Re: Different tabels and more CSS

Post by Mario777 »

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