Solved

incorrct image size using CSS height= and width=auto

Posted on 2007-12-06
8
1,358 Views
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 ?
0
Comment
Question by:ggivati
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 29

Accepted Solution

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

http://www.w3.org/QA/2002/04/valid-dtd-list.html

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.
0
 
LVL 18

Expert Comment

by:bruno
ID: 20424152
GreenGhost,

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

Expert Comment

by:Göran Andersson
ID: 20424293
In the tags. :)
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

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

Expert Comment

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



ggivati,

you have not yet implemented the doctype suggestion.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20953137
Forced accept.

Computer101
Community Support Moderator
0
 

Author Comment

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

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

770 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