Solved

incorrct image size using CSS height= and width=auto

Posted on 2007-12-06
8
1,354 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now