SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Oct 2006
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Replacing style for non-js version

    Hello,

    I'm using a div element on my web site with absolute positioning. When JavaScript is disabled, I want the div to have relative positioning instead.

    i.e. replace <div style="position:absolute;"> with <div style="position:relative;"> if JavaScript is disabled.

    What would be the best way to achieve this?

    Thanks

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2006
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please disregard. I added a separate div and it seems to have fixed the problem.

    But on a related note, if I wanted to hide an image when JavaScript is disabled, is there a simple method to do this?


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
  •