4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 image padding problem - CSS
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
enderws
Junior WebHelper
Junior WebHelper


Joined: 10 Aug 2002
Posts: 1

PostPosted: Sat Aug 10, 2002 7:49 am (15 years, 2 months ago) Reply with QuoteBack to Top

I'm trying to solve a discrepancy between Mozilla and IE. Using this code (available at http://buffoonery.org/2.0/joe.html ):

<html>
<head>
<style>
.imageviewbox {
margin-top: 10px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.imageviewbox img {
border: 1px dotted #842424;
padding: 10px;
background: #FFF;
}
</style>
</head>
<body bgcolor="#CCCCCC">
<div class="imageviewbox">
<img src="http://buffoonery.org/images/photolog/070502/6.jpg">
</div>
</body>
</html>

IE for PC does NOT draw a padding around the image. Mozilla DOES. How can I get IE to draw a padding around it? This code will be used with some PHP that sticks different size images into the box, so I can't set static widths and such. Any help would be appreciated.
OfflineView User's ProfileFind all posts by enderwsSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Sat Aug 10, 2002 9:49 pm (15 years, 2 months ago) Reply with QuoteBack to Top

try:
Code:

<html>
<head>
<style>
IMG.imageviewbox {
margin-top: 10px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
border: 1px dotted #842424;
padding: 10px;
background: #FFF;
}
</style>
</head>
<body bgcolor="#CCCCCC">
<img class="imageviewbox" src="http://buffoonery.org/images/photolog/070502/6.jpg">
</body>
</html>

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.051753 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme