Author Topic: Weird Spaces  (Read 12652 times)

0 Members and 1 Guest are viewing this topic.

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Weird Spaces
« 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.
And wasn't it you who told me,
"The sun would always chase the day"?

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Re: Weird Spaces
« Reply #1 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. :)
« Last Edit: January 31, 2010, 11:01:24 pm by Databits »
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Re: Weird Spaces
« Reply #2 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
And wasn't it you who told me,
"The sun would always chase the day"?

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Re: Weird Spaces
« Reply #3 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
And wasn't it you who told me,
"The sun would always chase the day"?

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Re: Weird Spaces
« Reply #4 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.
« Last Edit: February 04, 2010, 01:39:30 am by Databits »
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Re: Weird Spaces
« Reply #5 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
And wasn't it you who told me,
"The sun would always chase the day"?

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Re: Weird Spaces
« Reply #6 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.
« Last Edit: February 05, 2010, 06:58:53 pm by Senshuu »
And wasn't it you who told me,
"The sun would always chase the day"?

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,334
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Re: Weird Spaces
« Reply #7 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?

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Re: Weird Spaces
« Reply #8 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
« Last Edit: February 07, 2010, 06:06:35 am by Databits »
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Re: Weird Spaces
« Reply #9 on: February 15, 2010, 05:59:55 am »
Ah yes, I tried adding that now and it seems not to work! D:
And wasn't it you who told me,
"The sun would always chase the day"?

fesworks

  • Administrator
  • *****
  • Posts: 923
    • View Profile
    • http://www.fesworks.com
Re: Weird Spaces
« Reply #10 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.

Miluette

  • Sr. Member
  • ****
  • Posts: 332
  • C:
    • View Profile
    • Miluette dot com
Re: Weird Spaces
« Reply #11 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...
And wasn't it you who told me,
"The sun would always chase the day"?