Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
IE background-position not truly centered?
Old 03-21-2005, 10:09 AM IE background-position not truly centered?
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
I'm trying to get a background image and an image in the body to line up:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>TEST Page</title>
		<style type="text/css" media="screen"><!--
body   {
	background-color: #004786;
	background-image: url("http://www.siriusad.com/sta/images/v_bg.gif");
	background-repeat: repeat-y;
	background-position: center 0;
	text-align: center
	}

--></style>
	</head>

	<body bgcolor="#ffffff">
		<img src="http://www.siriusad.com/sta/images/v_bg.gif" alt="" height="100" width="780" border="0">
	</body>

</html>
The body image and background image are the same, and both centered, so you should not be able to see where one starts and the other ends. Now this works fine in Safari and FireFox, but (like always) it doesn't work in IE6. There is a 1px offset between the body content and the background image. Is there any way to get rid of this offset without affecting other browsers. Thanks.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
 
Register now for full access!
Old 03-21-2005, 10:41 AM
Wassercrats's Avatar
Average Talker

Posts: 17
Trades: 0
You can use Conditional comments. I don't know if there's a simpler way.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
Wassercrats is offline
Reply With Quote
View Public Profile
 
Old 03-21-2005, 10:48 AM
techwench's Avatar
Code Monkey

Posts: 1,449
Name: Danalyn
Location: Dallas, TX
Trades: 0
Try removing the "0" in "background-position". I use this quite a bit, and haven't had any problems with things lining up just using:
Code:
background-position: center;
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
techwench is offline
Reply With Quote
View Public Profile
 
Old 03-21-2005, 04:59 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
I removed the "0" - no effect, ended up taking Wassercrats' advice. Kinda sad that MS can't even center an image correctly... and it's not getting any better with IE7 i hear...
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to IE background-position not truly centered?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43921 seconds with 12 queries