The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V < 1 2  
Reply to this topicStart new topic
> Prevent Image Stretching
Christian J
post Oct 20 2017, 09:54 AM
Post #21


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



Here's a probably better one:

CODE
div {
width: 250px;
background: pink;
}

label {
width: 100%;
background: #ccc;
}

input {width: calc(100% - 30px);}

<div>
<label>
<input type="text" name="" value="">
<img src="small.gif" alt="">
</label>
</div>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V < 1 2
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 03:26 AM