Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Detroit, Michigan, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Styling through expressions and CSS (IE 6)

    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 <p style="position:absolute;left:400px">Some text here</p> 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... .

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Styling through expressions and CSS (IE 6)

    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.
    -Mark

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Styling through expressions and CSS (IE 6)

    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
    Jerry

  4. #4
    Star Lounger
    Join Date
    Sep 2002
    Location
    Detroit, Michigan, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Styling through expressions and CSS (IE 6)

    Thanks agains for the input. I will try it.!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •