+ Reply to Thread
Results 1 to 3 of 3

Thread: Need help width changing the style of wap to web

  1. #1
    ngmanhmedia69's Avatar
    ngmanhmedia69 is offline x10Hosting Member ngmanhmedia69 is an unknown quantity at this point
    Join Date
    Jul 2011
    Posts
    7

    Need help width changing the style of wap to web

    I want to my site automatically
    switch interface when mobile
    use and when to use
    computer, how do?

  2. #2
    Dead-i's Avatar
    Dead-i is offline Community Advocate Dead-i has a spectacular aura about
    Join Date
    Aug 2011
    Location
    United Kingdom
    Posts
    1,448

    Re: Need help width changing the style of wap to web

    Would you like it to switch the stylesheet or switch the page completely?

    If so, I think you can use this to make a mobile specific CSS. I think the first one is for computer and the second is for handheld devices
    HTML Code:
    <link rel="stylesheet" href="http://domain.tld/screen.css" type="text/css" media="Screen" />
    <link rel="stylesheet" href="http://domain.tld/mobile.css" type="text/css" media="handheld" />
    If you want to redirect mobile devices to a different place, you can use a method like this. In the below example, you can place this in between the <head> and </head>. It's only configured for iPhone/iPod, but I'm sure you can find ways to extend it to other mobile devices like Android:
    HTML Code:
    <script type="text/javascript"> // <![CDATA[
      if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)) {
        document.location = "mobile/";
      } // ]]>
    </script>

  3. #3
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Need help width changing the style of wap to web

    One of the best resources on the web is A List Apart, and they just happen to have a couple of articles that are exactly on point:

    Responsive Web Design

    Fluid Images

    WAP isn't covered, but WAP is a dying horse. Most mobile devices these days don't use the WAP version of a site, they use the "real web". Responsive design, using media queries, will right-size and right-format your site for modern smart phones and other small-form-factor devices (like 7"-format tablets and so forth).
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

+ Reply to Thread

Similar Threads

  1. Forum Width
    By dWhite in forum Feedback and Suggestions
    Replies: 28
    Last Post: 10-09-2011, 11:45 PM
  2. Extra width in firefox
    By Teensweb in forum Programming Help
    Replies: 30
    Last Post: 03-07-2010, 03:05 AM
  3. CSS Width
    By devongovett in forum Programming Help
    Replies: 1
    Last Post: 11-22-2008, 08:57 AM
  4. Scrollbar width..?
    By DecemberGuild in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 11-07-2006, 07:08 PM
  5. { width:95%; min-width:IE SUCKS !important; }
    By DecemberGuild in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 11-01-2006, 02:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers