SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cross-Browser X ... External Style Sheets?

    I have been working with the cross-browser.com X library and it works great as long as my styles are defined inline with the xhtml code. However, if I move my styles to an external stylesheet, things quit working.

    For example, if I have a div with id 'workPane' that has a left value of 200px defined in an external stylesheet, then the xLeft('workPane') function will always return 0.

    I really don't want to put styles inline with my xhtml, so are there any suggestions for making this work?

    Thanks.

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suspected that was what the problem was - i.e. the x library appears to only utilize the 'style' attribute which does not work for external style sheets. The question now is if/how I can modify the x library or if I am missing some piece of functionality built into it as this seems like a fairly basic issue.

    Thanks.

  4. #4
    SitePoint Addict dek's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using xOffsetLeft instead?
    Only dead fish go with the flow

  5. #5
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have ended up over-ridding the functions that were giving me problems, adding in some conditional logic to make sure the styles were located. So far, this appears to be working.


Bookmarks

Posting Permissions

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