CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 5th, 2003, 07:15 AM
Mr X Mr X is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: England
Posts: 21 Mr X User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Netscape 6 css margin/padding problem!

Hi

I am displaying a series of images with text aligned to the right of these images. Each line basically contains an image, then some text, some space and then the same again, an image and some text. Then it goes down to the next line where it happens again.

The problem resides in the fact in IE there correctly is a 1em gap between the image and the image above. However in Netscape 6 the image below is flush to the image above. This problem can be solved by increasing the margin/padding value but this then increases the margin/padding in IE and makes it too much!!

Is there something I should be coding to increase the margin in Netscape that wont increase in IE?

Here is my HTML:-

<div id="content">
<div class="medpics"> <a href="#"><img src="../eg_med.gif" width="40" height="50" border="0" alt="" /></a><a href="#" title="#">
</a>Lorem ipsum dolor sit ame<br />
Lorem ipsum dolor si</div>

<div class="medpics"> <a href="#"><img src="../eg_med.gif" width="40" height="50" border="0" alt="" /></a><a href="#" title="#">
</a>Lorem ipsum dolor sit ame<br />
Lorem ipsum dolor si</div>

<div class="medpics"> <a href="#"><img src="../eg_med.gif" width="40" height="50" border="0" alt="" /></a><a href="#" title="#">
</a>Lorem ipsum dolor sit ame<br />
Lorem ipsum dolor si</div>
</div>

and the CSS :-

#content {
margin: 0 22% 0 0;
padding-left: 1.5%;
font-size: 0.8em;
}

.medpics img {
float: left;
margin-right: 0.5em;
border: 0.1em outset #ffffff;
}

.medpics {
float: left;
margin-bottom: 1em;
width: 350px;
}

And ideas would be greatly appreciated!!

Last edited by Mr X : August 5th, 2003 at 09:50 AM.

Reply With Quote
  #2  
Old August 6th, 2003, 03:15 AM
Mr X Mr X is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: England
Posts: 21 Mr X User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Has nobody got any ideas?

Reply With Quote
  #3  
Old August 6th, 2003, 03:24 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,295 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 1 h 36 m 24 sec
Reputation Power: 760
Try using a percentage for your margin instead of em.
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #4  
Old August 6th, 2003, 04:55 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 17 m 15 sec
Reputation Power: 548
think its a bug in netscape 6,
i've tried your code in mozilla 1.2 / 1.5a
and mozFb
and can not reproduce your problem,

so even there is ways avoid ie to read css, it would afffect later version of gecko based browsers too,

Last edited by Akh : August 6th, 2003 at 04:58 AM.

Reply With Quote
  #5  
Old August 6th, 2003, 06:55 AM
Mr X Mr X is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: England
Posts: 21 Mr X User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have changed the margin to % now, it does indeed seem to work much better now in netscape 6, and still remains the same in ie which is good. Opera does render the gap slightly bigger now, but I can live with that!

Thanks everyone! It is much appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Netscape 6 css margin/padding problem!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway