Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-10-14 11:12:58

lottad
New Member
Registered: 2006-10-10
Posts: 5

Scaling images with CSS

After not fiddling with my pages in many months I decided to upgrade to 4.0.5 yesterday, and after the upgrade I’ve got a problem. When uploading new images they will scale according to my CSS when it comes to max width, but all of a sudden they will keep their original height.

The CSS part that affects the images looks like this:

.entry img { background-color: #ffffff; /* border: 1px solid #dddddd; */ /*-moz-border-radius:5px;*/ padding: 4px; max-width: 334px; }

Is there any kind soul out there who can enlighten me in a simple way :)

// Lotta

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2007-10-15 01:30:13)

Offline

#2 2007-10-15 00:57:23

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Scaling images with CSS

When uploading new images they will scale according to my CSS when it comes to max width, but all of a sudden they will keep their original height.

Well, because you can’t scale images or anything corretly by using CSS ;)

Cheers!

Offline

#3 2007-10-22 14:28:38

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Scaling images with CSS

This can be tricky. Have you tried to explicitly set height: auto ?

css-discuss has some useful general info on image scaling.

Martin

Offline

Board footer

Powered by FluxBB