473,378 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

padding squishes image in Opera 7

Hello all,

I made a nice frame around an image, using padding and border like
this:

<img style="padding: 5px; margin: 5px; border: 1px solid gray"
src="./stuff/gde.gif" alt="Gewerkschaft der Eisenbahner" align="right"
border="0" width="201" height="43">

But Opera 7.2 squishes the image. I think it's because I've sized the
image properly and Opera is trying to squeeze the padding into the
space taken by the image.

Safari, Mozilla/Camino, MacMSIE5 and Opera 6 do not do this and it
comes across as being a bug or at least counterintuitive.

I would love to hear your thoughts on this.

The page is here and it validates:
http://eriksrailnews.com/

Thanks!

Erik Sandblom
Jul 20 '05 #1
4 1953
"Erik Sandblom" <er***@operamail.com> wrote in message
news:5c**************************@posting.google.c om...
Hello all,

I made a nice frame around an image, using padding and border like
this:

<img style="padding: 5px; margin: 5px; border: 1px solid gray"
src="./stuff/gde.gif" alt="Gewerkschaft der Eisenbahner" align="right"
border="0" width="201" height="43">


Are not the 'border: solid 1px gray' and...
'border="0"' contradictory?
(and yes, I am asking, rather than being sarcastic)

--
Andrew Thompson
http://www.AThompson.info/
http://www.PhySci.org/
http://www.1point1C.org/
Jul 20 '05 #2
"Andrew Thompson" <an******@bigNOSPAMpond.com> wrote in message news:<LU*******************@news-server.bigpond.net.au>...
"Erik Sandblom" <er***@operamail.com> wrote in message
news:5c**************************@posting.google.c om...
Hello all,

I made a nice frame around an image, using padding and border like
this:

<img style="padding: 5px; margin: 5px; border: 1px solid gray"
src="./stuff/gde.gif" alt="Gewerkschaft der Eisenbahner" align="right"
border="0" width="201" height="43">


Are not the 'border: solid 1px gray' and...
'border="0"' contradictory?
(and yes, I am asking, rather than being sarcastic)

I don't know either, but removing that part doesn't change anything in Opera 7.2.

Erik Sandblom
Jul 20 '05 #3
On 4 Nov 2003 06:22:37 -0800, er***@operamail.com (Erik Sandblom) wrote:
I made a nice frame around an image, using padding and border like
this:

<img style="padding: 5px; margin: 5px; border: 1px solid gray"
src="./stuff/gde.gif" alt="Gewerkschaft der Eisenbahner" align="right"
border="0" width="201" height="43">

But Opera 7.2 squishes the image. I think it's because I've sized the
image properly and Opera is trying to squeeze the padding into the
space taken by the image.

Safari, Mozilla/Camino, MacMSIE5 and Opera 6 do not do this and it
comes across as being a bug or at least counterintuitive.

I would love to hear your thoughts on this.


Well I *think* you're getting bitten by the problem that it isn't always
very well defined how HTML and CSS cohabit. This use of the width and
height attributes is an exceptional case where you want to use HTML
attributes to define sizes, but I don't think it's clearly defined
whether they should then be used as the CSS width/height properties for
the box in question. Apparently Opera thinks so, and the other browsers
don't. Not actually a bug AFAICT.

Sticking a DIV around your image should get it working in all browsers.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #4
In article <5c**************************@posting.google.com >,
er***@operamail.com (Erik Sandblom) wrote:
But Opera 7.2 squishes the image. I think it's because I've sized the
image properly and Opera is trying to squeeze the padding into the
space taken by the image.


The problem would make sense in the quirks mode where padding intrudes
width. Your page has a doctype that is supposed to activate the
standards mode, though.

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Thomas Mlynarczyk | last post by:
Hello, I want to style an <a> element to have a special padding on "hover", like a {padding: 3px 5px 2px 4px;} a:hover {padding: 2px 4px 3px 5px;} No problem for Mozilla. Opera 7, however,...
17
by: delerious | last post by:
I'm trying to add some simple padding to an IMG by using a padding-right style, but it doesn't work in IE. Works fine in Mozilla and Opera, though. Here's a link to a page which displays this IE...
4
by: Harlan Messinger | last post by:
What is *supposed* to be the way to specify the horizontal offset of (a) the list item's marker and (b) the list item's content? In particular, see ...
7
by: Gustaf Liljegren | last post by:
I continued on the example shown earlier today: http://gusgus.cn/test/index.html Now I get some unwanted space in Firefox (the red space just below the first image) which doesn't appear in...
7
by: jmm-list-gn | last post by:
Hello, <http://www.asaom.edu> There are some curious spacing issues with the top bar (gray) and the main navigation bar. The most significant is how the nav bar looks in Opera v6 (win2k): the...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
2
by: Remi Villatel | last post by:
Hi there, I have following CSS definitions: div.limits { margin: 0 20px 0 20px; } div.halfleft { float: left; left: 0; width: 50%;
36
by: phil-news-nospam | last post by:
Here is a simpler (no drop shadows) example of the padding bug I see: http://phil.ipal.org/usenet/ciwas/2006-05-08/buttons-1.html So far I find nothing in the CSS2 document that says I should...
10
by: Alan Silver | last post by:
Hello, In my (seemingly) endless quest to understand CSS, I have yet another problem. Please look at http://www.kidsinaction.org.uk/ph/x.html in Opera, where you will see it how I expected. If...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.