Solved

Problem to picture file

Posted on 2016-11-07
3
67 Views
Last Modified: 2016-11-09
Hi,
Having these
    <div class="left up">
           <asp:Image ID="aspImagePreview" runat="server" AlternateText="Preview" ImageUrl="~/output.jpg" />
    </div>

Open in new window

on two deployed pages, one Web page is having no problem to the displayed picture file, but on another Web page, the picture file is too big. Why?
0
Comment
Question by:HuaMinChen
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Paweł
ID: 41878308
you probably are missing the css file on the second page that controls the size of the image.
0
 
LVL 10

Author Comment

by:HuaMinChen
ID: 41879826
I press F12 and have seen no problem. I already copy these

        .left img {
          border:Groove 1px #ccc;
          border-radius: 14px;
        }
        .left {
            position:absolute;
            left:10px;
            border-radius: 4px;
            width:330px;
            right:10px;
        }
        .up {
            top: 20px;
            border-radius: 4px;
        }

Open in new window

and have re-deployed the project but there is no improvement. What other css parts should be copied?
0
 
LVL 8

Accepted Solution

by:
Paweł earned 500 total points
ID: 41880063
it doesn't look as if you're setting the size on the image element

something like
//set image explicitly to particular size
.left img{
    width:330px;
            height:330px;
}

or try

//make image fit to container
.left img{
max-width:100%;
max-height:100%;
}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now