22565

How to increase image size based on table contents using html?

Question:

I have Created one table.Again I create one table but table created at inside of the first table.

First table : I added one image. second table : I write some content.

content is large so second table increase but first table and images not increased.so how to increase image size.

I used following code :

<html> <head> <style type="text/css"> body { font-family: Calibri; } table tr { border: none; } a, a:link, a:visited, a:active { text-decoration: none; color: #09B0CE; } img { border: none; width: 100%; height: auto; } </style> </head> <body> <table cellspacing="1" cellpadding="0" align="center" id="main-panel" style="width: 100%; background-color:#f2f2f2; color: rgb(75, 75, 75); border-collapse: collapse; border: 1px solid #f2f2f2;"> <tbody> <tr> <td > <table align="center" width="640px" style="width: 640px; padding: 2px 0px 2px 0px; background-color: #17B8DD"> <tbody> <tr> <td style="width:100%;"> <table> <tr> <td width="85%" style="padding-top:10px"> <a href="http://www.s.com"> <img src="http://KB/logo.png" alt="S.INC style="height:auto; width:auto" sizes="80vw"/> </a> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="padding: 0px 0px 0px 0px;"> <table style="color: #4D4D4D; font-size: 14px; font-weight: normal; width: 100%; border:1px solid #cccccc; padding: 10px 0px 10px 20px;" border="1px" cellspacing="2" cellpadding="3"> <tbody> <tr style="padding: 10px 10px 5px 10px;"> <th style="width: 32%">Control</th> <th style="width: 36%">Test Case Name</th> <th style="width: 32%">Status</th> </tr> <tr style="padding: 10px 10px 5px 10px;"> <th style="width: 32%">EnterpriseServer</th> <th style="width: 36%">AddPasswordForDataSource_ValidDataSourceIdAndPassword_PasswordAddedInDataSourceDetail</th> <th style="width: 32%">Failed</th> </tr> </tbody> </table> </td> </tr> </tbody> </table>

Answer1:

try this

<table cellspacing="1" cellpadding="0" align="center" id="main-panel" style="width: 100%; background-color:#f2f2f2; color: rgb(75, 75, 75); border-collapse: collapse; border: 1px solid #f2f2f2;"> <tbody> <tr> <td> <table align="center" width="" style="width:100% ; padding: 2px 0px 2px 0px; background-color: #17B8DD"> <tbody> <tr> <td style="width:100%;"> <table> <tbody><tr> <td width="" style="padding-top:10px"> <a href="http://www.s.com"> <img src="http://dakhal.net/Archieves/2/image/news_image_98.jpeg" alt="S.INC style=" width="100%"> </a> </td> </tr> </tbody></table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="padding: 0px 0px 0px 0px;"> <table style="color: #4D4D4D; font-size: 14px; font-weight: normal; width: 100%; border:1px solid #cccccc; padding: 10px 0px 10px 20px;" border="1px" cellspacing="2" cellpadding="3"> <tbody> <tr style="padding: 10px 10px 5px 10px;"> <th style="width: 32%">Control</th> <th style="width: 36%">Test Case Name</th> <th style="width: 32%">Status</th> </tr> <tr style="padding: 10px 10px 5px 10px;"> <th style="width: 32%">EnterpriseServer</th> <th style="width: 36%">AddPasswordForDataSource_ValidDataSourceIdAndPassword_PasswordAddedInDataSourceDetail</th> <th style="width: 32%">Failed</th> </tr> </tbody> </table> </td> </tr> </tbody> </table>

Recommend

  • C# VSTO Add-in - Convert plain text email to HTML
  • strip html tag from xml using xslt
  • Change global application font in a Windows 8.1 app
  • ingenious idea needed: how to declare different sizes for different fonts? @font-face?
  • Shortest path in a grid
  • What products support 3-digit region subtags, e.g., es-419 for Latin-American Spanish?
  • Extract text from “” HTML tag
  • Docker container for google cloudML on compute engine - authenticating for mounting bucket
  • How to use arithmetic operators with SAS macro variables [duplicate]
  • Netlink sockets and libnl - nl_recvmsgs_default returning -16 (EBUSY)
  • garbled css name when styling within UiBinder
  • How to open html table in xls on click of a button
  • Adjust width of select element according to selected option's width
  • ADO and msqli connections very slow
  • Visual Studio 2010 debugger build correctly - compiler pdb and linker pdb not in synch?
  • how to display data from 1st point on words on y axis for line chart in d3.js
  • Webgrid not refreshing after delete MVC
  • Alternative To body {overflow:scroll;} That Will Prevent Page Jostling/Wriggling?
  • Custom Tabgroup Appcelerator
  • Play WS (2.2.1): post/put large request
  • Jquery UI tool tip close icon
  • Read a local file using javascript
  • Highlight and Bold text in JTextPane
  • Scrapy recursive link crawler
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Xamarin Forms - UWP Fonts
  • Change JButton Shape while respecting Look And Feel
  • Modifying destination and filename of gulp-svg-sprite
  • Where to put my custom functions in Wordpress?
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Change an a tag attribute in JavaScript based on screen width
  • jquery mobile loadPage not working
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Unanticipated behavior
  • Traverse Array and Display in markup
  • CSS Applying specific rule for a specific monitor resolution with only CSS is posible?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Change div Background jquery
  • Qt: Run a script BEFORE make
  • How to Embed XSL into XML