Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
Pictures need to stay side by side regardless of browser size

Our project is trying to compare two pictures. We are able to have the two pictures pop up, but they just move on top of each other if we change the size of the window. We want them to stay side by side and just change the size of the image if the window changes. I've also put an example of the line of code for our images.

var stimulus =
  '<img src=' +
  'img/' +
  artistArray2_b[3] +
  '/' +
  lastName_b[3] +
  1 +
  '.jpg' +
  ' style="max-width:100%;" />, <img src =' +
  'img/' +
  artistArray2_b[3] +
  '/' +
  lastName_b[3] +
  2 +
  '.jpg' +
  ' style="max-width:100%;" />';
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

change the size of the image if the window changes.

This sounds like task for using CSS viewport related unit. In this case probably vw i.e. pertaining to width (100vw = full width), consider following simple example

<html>
<head></head>
<body>
<div style="background-color:#0000FF;height:100px;width:50vw"></div>
</body>
</html>

It does provide blue div with constant height of 100px and width half of viewport that is it will shrink or elongate depending on you changing size of your browser window.

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!