IE CSS Text alignment weirdness

Soldato
Joined
18 Oct 2002
Posts
16,075
Location
The land of milk & beans
Hi all,

I'm having a weird one with IE - it's adding 3px padding to the left of some P tags inside a div, but not others. The HTML and CSS is below, but here's what it looks like...

IE (wrong)
ie.gif


FF (right)
ff-1.gif



Code:
[i]HTML:[/i]
<div class="clickthrough-text">

<P>But, says Verdict Consulting, to exploit this advantage, it is essential that you understand the different consumer groups you serve and what they want from their online shopping experience. Then you must be able to identify when those customers visit your site and present them with an online experience that’s tailored to their needs. This isn’t to suggest you have a different site for every customer. But if your site can adapt to suit the preferences of different consumer groups, you will be on to a winner.</P>
<P><STRONG>Managing your range</STRONG><BR>Of course, catering to your customers’ wants and needs doesn’t mean you have to stock every item imaginable – although it can be easier to carry a wider range in the virtual world where you don’t suffer the costs of carrying that range. In fact, a survey conducted by Verdict Consulting revealed that a far lower proportion of consumers choose a website simply because it has a wide range of products.</P>

</div>

Code:
[i]CSS:[/i]

.clickthrough-text {
	font: 8pt arial;
	color: #000000;
}
.clickthrough-text P {
	margin: 10px 0px;
	padding: 0px;
}
 
FIXED!

The problem was because the contaning DIV (which I didn't include in the code above) only had left and right margins set, in theory letting the browser work out how wide the available content should be. This was too much for IE obviously as when i set the width the text fit properly.
 
Back
Top Bottom