SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    scarborough
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Read screen width

    Can you read the screen width on the fly. I am trying to make a responsive design which fits to the size of the browser width.

  2. #2
    SitePoint Enthusiast doddsey_65's Avatar
    Join Date
    Sep 2010
    Location
    North East UK
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use CSS to make elements fit the browser width using
    Code:
    width: 100%
    . A better choice would be to download Twitters Bootstrap Library which contains alot of helper classes for responsive design.

    You could also do it with jQuery or native Javascript, although the CSS method is probably better.

    There is no way to do this with PHP, as it is a server side language and has no interaction with the actual client (browser).
    Test and help out with a new
    100% open source forum package: A Simple Forum
    Check the A Simple forum Github Page
    Visit my Github profile to see what I work on.


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
  •