Xepher.Net Forums

Content => Web Design => Topic started by: Miluette on January 31, 2010, 04:27:38 am

Title: Weird Spaces
Post by: Miluette on January 31, 2010, 04:27:38 am
Ohh web design bugs me so much sometimes!

I've noticed for a while that on some of my sites (like Millennium http://millennium.senshuu.com), once the page finishes loading, there's a weird space between the very top of the content area and the top of the web browser area, where there shouldn't be one. (This happens for most of my layouts that are designed to always touch the very top of areas.) Like, the space pops in as soon as the page finishes loading.

I'm thinking there's some kind of Javascript code I'm using that might be causing this, because it didn't always happen. Also, when you navigate to any other page on the site the space goes away and won't come back unless you're just loading up the site in a tab/browser window for the first time.

I know it's not just my PC since it happens in all browsers on any PC, so I'm wondering just what might be causing it and how to fix it. Hurrrm.
Title: Re: Weird Spaces
Post by: Databits on January 31, 2010, 10:58:17 pm
Try setting your top/bottom margin of your body tag.

Edit: Actually, I ran some debugging tools on your HTML/CSS, try looking at the attfc CSS class.  That seems to be the cause of all your top space issues. :)
Title: Re: Weird Spaces
Post by: Miluette on February 01, 2010, 03:50:48 pm
The what wha? That's not something I defined in my stylesheets. Now I have to figure out what's causing that. e__e
Title: Re: Weird Spaces
Post by: Miluette on February 03, 2010, 07:31:03 pm
Derp. I saw you sent me an offline IM about this, and when I IMed you again later you weren't there apparently. :V
Title: Re: Weird Spaces
Post by: Databits on February 04, 2010, 01:35:59 am
Nah, right now I'm in school and work a lot, so even when I'm online I don't have a ton of time to spend on things like this.  Try just adding CSS for that in your stylesheet, it looks like something being auto-added to the top of your page.  What you may try doing is adding this to your CSS file:

Code: [Select]
#attfc { display: none !important; }
Edit: Actually I don't see it anymore, but it looked like a div with ad content in it auto-added to the code.
Title: Re: Weird Spaces
Post by: Miluette on February 04, 2010, 04:16:16 am
Ah. I tried adding that to my stylesheets but it's still happening. It's driving me maaaad!

Thanks for helping me though. If you can think of anything else let me know...XD
Title: Re: Weird Spaces
Post by: Miluette on February 05, 2010, 03:27:12 pm
Oh, one more thing. We had a hunch that Project Wonderful was causing the space, but it also happens on this site, which is devoid of PW code: http://tarot.senshuu.com

*pulls out hair*

EDIT: Oh, you think Google Analytics might be doing it? I have that code inserted into all the pages that do this, too. Hmmm.
Title: Re: Weird Spaces
Post by: Xepher on February 06, 2010, 02:53:13 am
Like Data said, it's atffc, and it's referencing a flash "button" or some such at this URL

http://bin.clearspring.com/at/v/1/button1.6.swf

Does that ring any bells for what might add that?
Title: Re: Weird Spaces
Post by: Databits on February 06, 2010, 04:32:24 am
Hmm, it's definitely JS that's adding it, so my CSS fix probably won't do much (as it'd add it and probably enforce its own style in the process).

As I said in AIM, I see you're using jQuery, so you COULD use your own JS to combat it if you wanted to:
Code: [Select]
<script language="javascript" type="text/javascript">
  jQuery(document).ready(function() {
    jQuery('#attfc').hide();
  });
</script>

Which I'd add right before the </body> tag of the HTML.  You're other alternative is to just flat out find what's adding it and kill it.

Edit: As I mentioned in AIM, this is another script injecting this into your site:
Code: [Select]
http://s7.addthis.com/js/200/addthis_widget.js
Title: Re: Weird Spaces
Post by: Miluette on February 15, 2010, 05:59:55 am
Ah yes, I tried adding that now and it seems not to work! D:
Title: Re: Weird Spaces
Post by: fesworks on February 26, 2010, 03:26:22 am
Are you using WordPress? It's been happening on my sites too (PSI, Ardra) I use Webcomic and Inkblot... not sure if there is a relation. appears to happen random. I don't use widgets. It's not been a big deal for me though.
Title: Re: Weird Spaces
Post by: Miluette on February 26, 2010, 09:59:11 am
It happens on WP and non-WP sites. Basically, everywhere I put the AddThis button into the code, and it loads in some little javascript button thingy at the top of the page when it's done loading. :B

AddThis is so handy, I don't want to remove it...