HTML image size: percentage minus a set width?

  • Thread starter Thread starter ???
  • Start date Start date
?

???

Guest
I have an image, whose width is 355 pixels. I want another image on the same line to take up the rest of the line, depending on the size of the window.

Is it possible to do this using HTML? I tried searching it up on search engines, but "percentage minus a set width" didn't come up with anything. Please help?
 
The short answer is without knowing the width of the client's window, you can't really mix percentages and fixed sizes and get the result you want.

You could use JavaScript to get the window size, subtract 355 from it, and make that the literal width of Image B; or, you could fix the size of the page and do it that way.
 
try using a table to do it:

<table style="width: 100%"><tr><td style="width: 355px;">
<img src="IMAGE 355 PX PATH HERE" width="355"></td>
<td><img src="OTHER IMAGE PATH HERE" width="100%"></td></tr></table>

hope this helped :)
 
Back
Top