Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1px Difference in IE - Help? 1

Status
Not open for further replies.

cLFlaVA

Programmer
Jun 14, 2004
6,450
US
Hi all,

I'm looking for a non-hack way of fixing my 1-pixel difference for some modifications i'm making on my site.

the test page is here:


and the css is here:


i am using ie 6 and i see a 1px red line (made red for debugging purposes) to the right of the #news-info and h1 tags.

can someone help me out?

thanks.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Two changes. Not sure if they are strictly right, but it fixes the problem in IE and still works in FF.

Code:
#left-col {
	/*width: 499px;*/
	margin-right:200px;
	float: left;
	line-height: 1.7em;
	background-color: red;
}

#news-info {
	/*width: 100%;*/
	padding: 1em 0 1em 0;
	border-bottom: 1px dashed #333;
	text-align: center;
	list-style: none;
	background-color: #D8DDF2;
}

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
foam,

that's a little better, but now i don't see the black line between the left and right columns in IE.

any other ideas?

thanks so far.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
<thinking class="aloud">
I wonder if it's a rounding error. You are using ems to specify padding etc. Perhaps IE can't cope with it?</thinking>

Yep.

If I scale the text the gap disappears. I think BRPS had a similar problem a while back. Can't recall how he got around it though.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
Rounding errors when defining padding (and margins) in ems is probably the answer. I've certainly seen some problems with using ems in this way.

Maybe you could set the margin to be 1px and the padding to be a very smal amount in ems. That'll kinda scale. Kinda. Maybe look at using client-side condition statements to output different css to the the page to cater for IE specific differences - or underscore it [smile].

Maybe redesign? <em class="cheeky">smirk</em>

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
foam,

the blue background thing would kind of work, but then the borders wouldn't come over to the end. also, i'm not sure how that would work on my other pages, since they won't all be starting with the same elements / ids.

jeff,

the new design was in my original plan, but then everyone in OPSP told me they liked the old design better, so i developed a complex and then began agreeing with you all, so i just decided on some tweaks to my existing site.

if margin/padding ems are the issue, what is the preferred method? i thought this would be the best way to go, since it allows for full scalability. i want to avoid px whenever possible.

any ideas? what do you mean by the 1px "kinda" fix? i don't like "kinda" fixes - i'm too anal...

ahhhh!!! soo frustrating.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Is this fixed, cause I don't notice it in IE6 or FF 1.5

Also, on behalf of myself and others 1600x1200 users everywhere, widen that center column!
 
skiflyer,

it's kind of hard to see in IE6. there is a 1-pixel black border on the left, between columns, and on the right. if you size the text larger you may be able to see the difference easier, by scrolling to the bottom of the page.

here's a screenshot:


*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
update:

i fixed my left and right paddings (and margins) to all be pixelated. it worked most of the time.

i was still experiencing problems with the blockquote. i removed the frigging italics and it worked fine.

i'll have to find another font i guess.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top