• Styling through expressions and CSS (IE 6)

    Home » Forums » Developers, developers, developers » Web design and development » Styling through expressions and CSS (IE 6)

    Author
    Topic
    #428674

    Is it possible to create styling features through CSS whose values are the result of some sort of expression or formula?. i.e. Could the “left” attribute of the paragraph represented by this tag

    Some text here

    be expressed in terms of some “function” like.”…500px-something.width*2…” much like controls can be placed and size in VB based on the size and location of other controls….. Thanks in advance… .

    Viewing 1 reply thread
    Author
    Replies
    • #996393

      You can’t do this directly in CSS code. There is no mechanism to calculate results in the CSS specification. If you are using a dynamic scripting language, such as PHP/ASP/etc, it may be possible, although I have never tried it. In any event the calculation cannot be done client-side in the browser; the code must be generated according to defined standards or it will not render.

    • #998768

      Hi there

      I was looking into this problem of yours and I found a link to what could a useful link for you. This webpage explains how to use JavaScript and CSS to compliment each other. It appears to work with IE5 and above. I have not tried this and cannot vouch for use in Firefox etc

      CSS Expression Optimization

      Good luck

    Viewing 1 reply thread
    Reply To: Styling through expressions and CSS (IE 6)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: