Solved

Problem to picture file

Posted on 2016-11-07
3
42 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

11 Experts available now in Live!

Get 1:1 Help Now