Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Weird Issue with Body Text and Banner

    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:

    <style>
    body {
    margin-top: 325px;
    padding:0px;
    }
    </style>

    <style>
    .topbanner{
    position: relative;
    top: -1055px;
    left: 120px;
    width: 746px;
    height: 263px;
    margin-left: -450px;
    padding:0px;
    }

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

  • #2
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •