incorrct image size using CSS height= and width=auto

Posted on 2007-12-06
Medium Priority
Last Modified: 2012-06-27
I am building a website using CSS to define a common height to images and letting the browser decide on the width automatically.
The reason is that I have alot of pictures and I do not want to set each one in frontpage.
If you enter the any of the porducts for the first time, the height is correct but the width is not.
Press the link on the left to the same pageg - and it all sorts out ok.
Any ideas what I should do ?
Question by:ggivati
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
LVL 29

Accepted Solution

Göran Andersson earned 2000 total points
ID: 20423931
First, get a doctype for your page.


I looked at the page in Firefox and Internet Explorer 7. The size of the images is completely different between the browsers, but I don't see the effect that you describe in any of them.
LVL 18

Expert Comment

ID: 20424152

curious where you found a link to the page?
LVL 29

Expert Comment

by:Göran Andersson
ID: 20424293
In the tags. :)
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.


Author Comment

ID: 20424316
The link is "testing.givati.eu".
I am using ie 6.
LVL 18

Expert Comment

ID: 20459124
thanks GreenGhost, didn't see that.


you have not yet implemented the doctype suggestion.

Expert Comment

ID: 20953137
Forced accept.

Community Support Moderator

Author Comment

ID: 22646289
It seems the problem is in IE 6. I have written a javascript code to fix width and length of the pictures.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question