Is it possible to define the image size of this control using CSS?
<img style="border-width: 0px;" alt="Test image" src="userdata/1/uploadedimage/database%20entry.jpg">
I'm unsure if there is a way to specify a specific size for this image either through CSS, jQuery, or directly in my C# code using something like img.Style.
UPDATE:
To provide more context, here is an example of my CSS:
div .test
{
width:90%;
z-index:1;
padding:27.5px;
border-top: thin solid #736F6E;
border-bottom: thin solid #736F6E;
color:#ffffff;
margin:0 auto;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
word-wrap: break-word;
}
In my code, images are dynamically added within the div as users input text into a textbox (the div itself is also assigned dynamically).
while (reader.Read())
{
System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
div.Attributes["class"] = "test";
//div.Style["float"] = "left";
div.ID = "test";
Image img = new Image();
img.ImageUrl = String.Format("{0}", reader.GetString(1));
// this line needs to be represented in sql syntax
//img.ImageUrl = "~/userdata/2/uploadedimage/batman-for-facebook.jpg";
img.AlternateText = "Test image";
div.Controls.Add(img);
div.Controls.Add(ParseControl(String.Format("{0}", reader.GetString(0))));
div.Style["clear"] = "both";
test1.Controls.Add(div);
How can I apply the suggestions provided below in this particular scenario?