www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] Possible top padding/margin issue

  1. #1
    Join Date
    Apr 2008
    Posts
    14

    resolved [RESOLVED] Possible top padding/margin issue

    Sometimes on my website i get extra padding/margin at the very top of the page which shifts everything down. As i have a black banner as my page background this stays put and the content lowers and looks broken. Is this a CSS issue with padding or margins? I'm really stuck as this doesn't happen everything i visit the site - it seems a bit random.

    My website is: http://www.kerryellisweb.co.uk

    CSS: http://www.kerryellisweb.co.uk/asset...es/default.css

    Image of the problem is attached.

    Grateful for any help.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2010
    Posts
    27
    it looks to me not to be a top margin issue on the image but seems to be associated with the height of the links in the top navigation, I would guess you need to change #pNavigation a to height: 24px
    looks like the font height, padding and height are adding to more than you intended

  3. #3
    Join Date
    Apr 2008
    Posts
    14
    Thanks, tjedgar. I've tried this but hasn't solved the problem

    I have just noticed some extra code is being added for some reason. I've looked at the page using Firefox's Firebug add-on and found this is added after the <body> tag:

    <div id="atffc"><object width="1px" height="1px" id="atff" data="//bin.clearspring.com/at/v/1/button1.6.swf" type="application/x-shockwave-flash"><param name="wmode" value="transparent"/><param name="allowScriptAccess" value="always"/></object></div>

    Not sure where that's coming from - nothing in my original HTML file!

  4. #4
    Join Date
    Apr 2008
    Posts
    14
    Just found out what the problem was. I have the ADDTHIS bookmarking feature on my site which was adding the code in some browsers the first time a user visits my website.

    Found out the solution is to add extra code after the ADDTHIS code:

    <script type="text/javascript">
    var addthis_config = {
    data_use_flash: false
    }
    </script>

    Thanks for your help.

  5. #5
    Join Date
    Feb 2010
    Posts
    1
    @fabala2008 Thanks so much for your solution! I was having the same exact problem on my website (upsidedowntext.com). The banner at the top was being (sometimes) pushed down a couple pixels. It was strange because sometimes the bug would appear and other times it would not, and even stranger, in Firefox, when I refreshed the page the extra padding disappeared. So I assumed it was just a rendering problem. But after noticing the extra padding numerous times I finally decided to investigate. Your var addthis_config = { data_use_flash: false } solution worked perfectly. So just wanted to say thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles