How to keep an image inside a section |
How to keep an image inside a section |
JUI43555 |
Mar 11 2023, 09:04 PM
Post
#1
|
Member Group: Members Posts: 44 Joined: 6-March 23 From: Perth Member No.: 28,833 |
Hi there, how do I make the image of the teddy bear stay inside the area that it's in? (the cream coloured box). Thanks. |
coothead |
Mar 11 2023, 09:12 PM
Post
#2
|
Advanced Member Group: Members Posts: 206 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 |
Hi there JUI43555,
without seeing your code it is difficult to give you a precise answer, but the usual method is somewhat like this... CODE img { display: block; width: 100%; /*adjust value to suit */ height: auto; margin: auto; } coothead |
JUI43555 |
Mar 11 2023, 09:20 PM
Post
#3
|
Member Group: Members Posts: 44 Joined: 6-March 23 From: Perth Member No.: 28,833 |
Hi there JUI43555, without seeing your code it is difficult to give you a precise answer, but the usual method is somewhat like this... CODE img { display: block; width: 100%; /*adjust value to suit */ height: auto; margin: auto; } coothead That worked perfectly. Thank you very much. |
coothead |
Mar 11 2023, 09:24 PM
Post
#4
|
Advanced Member Group: Members Posts: 206 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 |
Hi there JUI43555,
no problem, you're very welcome, coothead |
Lo-Fi Version | Time is now: 27th April 2024 - 04:40 AM |