Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7676071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:06:51+00:00 2026-05-31T17:06:51+00:00

This is my code <div data-role=page id=callAjaxPage> <img id=logo src=images/logo.JPG alt=logo /> <div data-role=header>

  • 0

This is my code

<div data-role="page" id="callAjaxPage">

    <img id="logo" src="images/logo.JPG" alt="logo" />

    <div data-role="header">
        <h1>Login</h1>
    </div>

    <div data-role="content">
        <form id="callAjaxForm" data-ajax="false">
            <div data-role="fieldcontain">
                <label for="userName" id="userNameLabel">Username</label> <input
                    type="text" name="userName_r" id="userName" value="" /> <label
                    for="password" id="passwordLabel">Password</label> <input
                    type="password" name="password_r" id="password" value="" /> <br />

                <button data-theme="b" id="submit" type="button">Submit</button>
            </div>
        </form>
    </div>
</div>

In this code i have an image which is the logo. I Just need to reduce the height of the image. What i have tried is manually setting the height to say 150px but what happens is that the height gets reduced but my width also reduces. Even if i hardcoded my width, still it reduces. The problem maybe the image is small.I also tried placing it in a div and i manually set the corresponding height and width but the div concept cuts the image. I dont want the image to be cut or something.I just want it to shrink in height. I dont care about the quality. How to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:06:52+00:00Added an answer on May 31, 2026 at 5:06 pm

    Reducing the height is doing what almost anyone wants – keeping the aspect-ratio when you change the height. If you need to keep the width, change the width AND the height to the height it was with the desired width

    for example DEMO

    $(document).ready(function() {
      var img = $("#logo");
      var width = img.width();
        alert(width);
      img = $('<img height="250" width="'+width+'" alt="'+img.attr("alt")+'" src="'+img.attr("src")+'"/>')
      $("#logo").replaceWith(img);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my code: <div data-role=content data-theme=b> <div data-scroll=y> <ul> <li data-role=button data-icon=arrow-r onclick=redirectPage(1);>All
I have this two lines of html code... <div id=slider1 data-param1=XXX data-param2=XXX></div> <script src=script.js
This code $(#loading).ajaxStart(function() { alert(start); $(this).show(); }); in my mark-up <div style=text-align:center;><img id=loading src=../images/common/loading.gif
I have the code below loading into a jquery mobile page data-role. Two strange
Why does this code: var jQueryString=div.data > div.item > div.quantity,div.article,div.price > :input; $(jQueryString).live(click, function(event)
I have this code that populates the div with the form input data: var
there are some code as this: <div class=test> <div class=upsell-tags> <?php echo $this->getChildHtml('product_additional_data') ?>
I have this code: $(div[id^='intCell']).mouseover(function() { $(this).css({ border:,1px solid #ff097c}); }).mouseout(function() { $(this).css({border:,1px solid
This code attempts to dynamically switch the class of the StateContainer div from StateOne
Using this code var html='<div class=somediv></div>'; var target=document.getElementById('contentArea'); target.appendChild(html); I'm getting Uncaught Error: NOT_FOUND_ERR:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.