FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-07-2021, 02:19 PM   Postid: 188570
ricktrip
Site Owner
 
ricktrip's Avatar

Forum Notability:
26 pts: User-friendly
[Post Feedback]
 
Join Date: Oct 2003
Posts: 81
CSS help

I need some advice on using CSS; I’m very much an amateur programmer and only have a basic knowledge of CSS. The following code is on one of my website pages:
Code:
<div>
<img src="xxx.jpg" style="width:58%">
<img src="yyy.jpg" style="width:40%">
</div>
I am placing pairs of images side-by side with commentary. This occurs a dozen or more times on each page, so it can be tedious to edit the two percentage numbers. Currently I adjust the first image width, then make a corresponding change in the second so the total is 98%; this allows me control over appearance with a small but useful border between the images and the second one never being squeezed out to fall under the first. I don’t care what the image heights are, only the widths. I minored in math but am crappy at arithmetic, so I hated calculating what the second width must be. I am hoping that some clever CSS will allow the second image to automatically fill in the remaining space, but so far nothing I’ve tried works. If there is no way, perhaps someone can suggest a Javascript solution; I haven’t studied that language yet, so any suggestion there will have to be simple.

Many thanks for whatever comments I can get!
ricktrip is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:22 AM.


Running on vBulletin®
Copyright © 2000 - 2019, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2019 FutureQuest, Inc.
FutureQuest, Inc.