Results 1 to 5 of 5

Thread: ctrl & +

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ctrl & +

    i need a button on my website that works like ctrl and+ or ctrl and -
    to make the screen bigger and smaller.
    can anybody help me to such a button???
    Last edited by lampje; 10-29-2009 at 09:43 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default almost:)

    hi niels,

    thanx for the fast reply and the script but its not what i need
    this script only makes the tekst larger. (it works great)
    i want a button to do what ctrl&+ does in a website
    make everything bigger and keep the tekst on the page
    how can i asign a keyboard stroke to a button on a website?
    can you help me do that??

  4. #4
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ok:
    Code:
    <html>
    <head>
    <title>Javascript Document Resizer</title>
    <script type="text/javascript">
    // Made by Nile
    //UnlinkThis.net
    //This credit tag must not be removed!
    var size = new Array("XSmall", "Small", "Medium", "Lage", "XLarge", "XXLarge");
    var reSize = function(size){
    document.body.style.zoom = screen.width/size;
    };  
    </script>
    </head>
    <body>
    <img src="http://puppywar.com/images/cards/31309.jpg" /><img src="http://www.classact.ca/RubberStamps/Dogs/D06B_B_Large%20Dog%20Paw.jpg" /><br />
    <h1>HTML Ipsum Presents</h1>
    	       
    <p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>
    	       
    <ol>
       <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
       <li>Aliquam tincidunt mauris eu risus.</li>
    </ol>
    
    <blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p></blockquote>
    
    <ul>
       <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
       <li>Aliquam tincidunt mauris eu risus.</li>
    </ul>
    
    <pre><code>
    #header h1 a { 
    	display: block; 
    	width: 300px; 
    	height: 80px; 
    }
    </code></pre>
    <div id="zoomer">
    <input type="button" value="Small" onclick="reSize(screen.width+100)"/><input type="button" value="Medium" onclick="reSize(screen.width)"/><input type="button" value="Large"  onclick="reSize(1100)"/><input type="button" value="XLarge"  onclick="reSize(1000)"/>
    </div>
    The highlighted are the parts you need. Place the first highlighted text into the <head> part of your document, and the second highlighted text in any part of the <body> tag in your document you want.
    Last edited by Nile; 10-30-2009 at 02:54 PM.
    Jeremy | jfein.net

  5. #5
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default i was searching for this

    i was searching for this
    but the proplem is that i copied the aboce code and put in html document and tryed it but it is not working

    i tried text resizer from the above link
    it works great and simple to use but it doesnt enlarge the css

    what i mean is

    my website is social networking website

    and i have the profile fields information in css

    when i do the text resizer it resize all the text but doesnt resize the text in the profile information which is writeen in css

    is there a css code that i can use to resize the font size ?

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
  •