Categories > TinyButStrong general >

Can att modify a value in CSS?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Alan Lake
Date: 2009-12-15
Time: 07:31

Can att modify a value in CSS?

I had html that looked like this:
<table id="whole_page">
where the CSS looked like this:
#whole_class { width: 1000px; }
.  I wanted to use att to replace the value of width in the CSS, but, of course, it would only modify the table tag.  I could replace the id value with another value, but that's not what I wanted to do.

I finally scratched the #whole_page in the CSS and ended up with this:
    <table>
      <tr><td>[onload.page_width;att=table#width]</td></tr>
It works OK, but it does limit the usability of att to those items that are not in CSS.

Is there a way to use att to modify the contents of a CSS definition?
By: Skrol29
Date: 2009-12-15
Time: 16:42

Re: Can att modify a value in CSS?

Hi,

You can add or define a secondary class that will overwrite the design defined by #whole_class.

PHP:
$page_width = 'width2';
HTML:
#whole_page { width: 1000px; color:#FF;}
.width2 = { width: 500px;}
...
<table id="whole_page">
  <tr><td>[onload.page_width;att=table#class;attadd]</td></tr>

You can also define precisely the width by placing a TBS tag in the CSS definition.

Another solution is to use parameter "att" to insert a style attribute with the new width that should overwrite the previous one.