Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

ian izaguirre
ian izaguirre
3,220 Points

Why is there a flash of the horizontal computer scrollbar on the bottom of my page on every page load?

Hi, on my website: http://pantryliquors2.com/

I see a flash of the horizontal computer scrollbar on the bottom of my Wordpress page every single time the homepage loads or any other page of my site loads or I refresh the page. It is as if something is expanding and then fitting into position as the bar disappears in 3 seconds?

Can you help me figure what is the cause of this out? I have tried looking for the cause but I cant figure it out using firebug ?

Thank you for any help :-)

For me this is only a split second it seems to be as its still loading the content and I notice you have used inline styles alot, But a very wild guess would be its caused by the loading of the java script as that's loading last on the page (as it should) But it really only shows for half a second on my screen so i wouldn't say that it is an issue to worry about.

4 Answers

ian izaguirre
ian izaguirre
3,220 Points

Thank you so much for that. I have only noticed this on my site, do you think this is bad practice or an unprofessional look if I was designing a website for someone to have the page have that 1 second scroll bar appear on EVERY page load?

and another question. What is inline styles? Is that the styling that a paragraph I write gets when I change the text color and size etc. using ONLY the Visual editor in word press? If it is , then is it preferred/better to just add plane text in the html view and format the text using css by creating a custom div class and adding customizations through the child theme only?... leaving just plane text and div classes in the html view of the text in the word press editor?

Id say if you could get away without it being there then thats better but. I personally have no idea what it is causing it. Its not so bad for me tho as i have to look for it to notice it.

Here is a video that can explain adding css to your pages http://teamtreehouse.com/library/websites/css-foundations-2/getting-started-with-css-reshoot/adding-css-to-a-page

ian izaguirre
ian izaguirre
3,220 Points

do you think its better to just add plane text in html view and then change the font color etc. using span or div classes/ids that are from my child theme rather then adding customizations through using the visual editor?

I dont fully understand your question. Im saying its better to do your CSS in an external file then link it in to your html and yes using selectors. It makes things to much easier and faster to edit.

ian izaguirre
ian izaguirre
3,220 Points

Right, and so you are saying ( from my understanding) that you think its better practice to avoid the wordpress visual editor completely and use an external css file to modify my text?

Yes if you can do that but if you cant then stick to what you know.

ian izaguirre
ian izaguirre
3,220 Points

I can :-) Thank you for your help. One last question - do you think by fixing the site and doing that then the horizontal bar problem will go away ?

ian izaguirre
ian izaguirre
3,220 Points

I found out what was causeing it , it was this piece of css :

/* MOVES facebook like button in footer */

.facebooklike-title { background: none repeat scroll 0 0 transparent; margin-left: 203px; margin-top: -54px; position: absolute;
}

Any reason why?

ian izaguirre
ian izaguirre
3,220 Points

ok so upon further investigation I do not think it is from using the visual wordpress editor a lot instead of using spans and divs to format my text. It was brought to my attention that some things on my site are being loaded from the footer instead of the header. How can I correct this so this grey flash of the horizontal bar can go away for good ?