To resize the image proportionally using CSS:
img.resize {
width:540px; /* you can use % */
height: auto;
}
More Related Contents:
- Text in my heading should be top not bottom [closed]
- CSS indentation not working [closed]
- How do I disable the resizable property of a textarea?
- How do you keep parents of floated elements from collapsing? [duplicate]
- Center image using text-align center?
- Cut Corners using CSS
- Why do browsers match CSS selectors from right to left?
- How to remove margin space around body or clear default css styles
- What to use in place of ::ng-deep
- CSS Grid Layout not working in IE11 even with prefixes
- How to deal with page breaks when printing a large HTML table
- Change div order with CSS depending on device-width
- Why does the outer here not completely surround the inner ?
- HTML/CSS: Making two floating divs the same height
- What does appending “?v=1” to CSS and JavaScript URLs in link and script tags do?
- How to set the margin or padding as percentage of height of parent container?
- CSS content property: is it possible to insert HTML instead of Text?
- background: fixed no repeat not working on mobile
- How to make a display in a horizontal row
- Creating a Zoom Effect on an image on hover using CSS?
- avoid page break inside row of table
- CSS only solution to set MULTIPLE “same height” row sections on a responsive grid
- Rounded corners in outlook without images
- Same height column bootstrap 3 row responsive
- Skewed Borders on a Div
- How to change the style of a ‘s label?
- CSS custom cursor doesn’t work in FF/Chrome
- Flexbox with fixed header and footer and scrollable content
- Prevent a centered layout from shifting its position when scrollbar appears
- Is it possible to hide the title from a link with CSS?