View Full Version : Weird Issue with Body Text and Banner

05-31-2010, 04:52 PM
Hi, I have a question about an issue I'm having with a Myspace site. I know Myspace is probably frowned upon, but I'm just trying to do something simple with this page.

Here's the site: www.myspace.com/safeandsound61

I'm having two issues - In all web browsers I've checked it in, there is a large gap at the top of the body text on the right. I know that the margin code is affecting this, but if I remove it, it also will remove the margin I need widened at the top of the page for the banner.

The other issue is that the image at the top of the page is centered now in IE, but it is slightly shifted to the right in Firefox and Safari.

Here is my code:

body {
margin-top: 325px;

position: relative;
top: -1055px;
left: 120px;
width: 746px;
height: 263px;
margin-left: -450px;

<div class="topbanner">
<img src="http://cmattayers.com/images/safety.png" />

06-30-2010, 05:01 PM

Avoid using codes like top: -1055px; margin-left: -450px; instead use text-align: center, this will affect evenly in all browsers for center alignment

these type of coding will cause different and more over IE browser you need to indicate the values example for IE if you specify padding : 0 then only alignment will be correct because for each browser they will have default value, if you did not specify padding value then moz will have its own default value to be used and IE it has its own so it is better we need to specify it even if we did not use that value, example even if we do not use padding we have to specify padding is 0

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum