www.webdeveloper.com
Results 1 to 2 of 2

Thread: noscript throwing style off

  1. #1
    Join Date
    Apr 2012
    Posts
    110

    Question noscript throwing style off

    I have this code on my site:

    Code:
     <noscript><? if(!validateUsername($_POST['username']) && ($_POST)){ ?>
         <div style="padding-top:10px;"><strong><img src="images/red_x.png" width="24" height="24" /> Invalid Username:</strong> The username must have 5 or more characters
          <?php $errors=1; } ?></div></noscript>
    the page looks fine with javascript on.

    I notice that when i turn off javascript, it skews everything. whereas i had everything scattered, it removes that style. why?

  2. #2
    Join Date
    Nov 2006
    Location
    Oakland
    Posts
    500
    Because at that point it displays the following HTML if the PHP test condition is satisfied:

    <div style="padding-top:10px;"><strong><img src="images/red_x.png" width="24" height="24" /> Invalid Username:</strong> The username must have 5 or more characters</div>

    You also need to make sure that Javascript is not used elsewhere in your web page for styling purpose.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles