SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    reading webkitColumnCount

    I can't understand why I can't read this CSS property (already stated in the CSS in the head of the document).

    Code:
    alert(div.style.webkitColumnCount);
    This returns undefined, even though it's set in the CSS (eg. -webkit-column-count: 6).

    I can *set* the properties in JS, it just doesn't seem to want to read them with this current syntax. Wondering if I am missing something really simple?

    thanks.

  2. #2
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    turns out this worked for me, would love comments on if this is the best method though

    Code:
    document.defaultView.getComputedStyle(div, null).webkitColumnCount
    thanks!


Tags for this Thread

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
  •