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

  • Home
  • SEARCH
  • 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 8699691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:00:43+00:00 2026-06-13T02:00:43+00:00

How to style background-image url height and width I am using sencha-touch AND building

  • 0

How to style background-image url height and width

I am using sencha-touch AND building a mobileApp,
I have a view with a image – Xtype

    var profilePicture = {
        xtype : 'image',
        style : 'margin-top:10px;',
        id : 'profilePhoto',
        src : 'resources/images/profile.png',
        height : '104px',
        width : '84px'
    };

I added this image in the panel
I dynamically set the image’s src in my controller with the value of json I get from the server,

src = localStorage.httpServerPrefix + profile.imageURI; // I get the image URL
Ext.getCmp(“profilePicture”).setSrc(src.);

When I see in the browser
I get like,

<div class="x-img" id="profilePhoto" style="margin-top: 10px; height: 104px !important; width: 84px !important; background-image: url(http://127.0.0.1:8080/Milna/user/mphoto/1?version=7); "></div>

Height and width of the div are set to 104px and 84px.
My image’s size is 1600px × 1200px, so that it does not fit into the above div.
Is it possible to style the background image url???
What can I do to style the image which is coming from the url?

  • 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-06-13T02:00:44+00:00Added an answer on June 13, 2026 at 2:00 am

    Take a look at this Refactored scope. In this article thay have explained about the styling function.

    you’re styling will be more consistent, and more importantly it will make you totally look good when you restyle an entire mobile app in minutes instead of days.

    Style: ‘background: resources/images/profile.png; width: 45%’,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Ex: <div id=h style=background-image:url('images//line.jpg'); background-repeat: repeat-x; width:300px; height:25px; padding-left:10px; color:white;>Frame</div> Now, I want to
why when i write document.getElementByClass('home1').setAttribute('style', 'background-image:url(img/red_menu.PNG);'); it doesn't work? i have the element with
I have this piece of code: <table style=background-image: url(path/to_image.png)> And when I load it
Is there a possibility to access a i.e background-image:url() property inside an inline style
I have this in my CSS file: body {style.css (line 3) background:#CDF8FF url(images/final_bg.jpg) no-repeat
I've come across an interesting problem in the following line of code: <img style=background-image:url(Resources/bar.png);
string in question: '{images:{0:<div style=\\background:red;width:250px;height:250px;display:block;position:absolute;\\></div>}}' I've tried various combinations of single and double quotes.
I have an element on a page with background image set using css: //
I have done split view using 'hbox' layout, as below: Ext.define('Sencha.view.Blog', { extend: 'Ext.Panel',

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.