Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Site has dipped down a few pixels...
Old 07-14-2011, 09:59 AM Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
Hi, I am designing a site in Wordpress using a theme and the site was originally lined to the very top of the page using:

Code:
* {margin: 0; padding: 0;}
Somewhere along the way however, I have edited something and the site is no longer aligned with the top of the page.

Anyone know any common causes of this problem?

Many thanks
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
 
Register now for full access!
Old 07-14-2011, 11:14 AM Re: Site has dipped down a few pixels...
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 9,007
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
I usually put margin: 0; padding: 0; on the body or a wrapper div.

But you'll have to look at where you've put in margins or padding elsewhere in the page, because zeroing it out doesn't cancel margins or padding added later, of course.

If you're stuck as to what's causing it, I sometimes put a 1px border around my elements in a contrasting color to see what's doing what, then take them back out once I've figured it out.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 07-14-2011, 11:32 AM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
I'm hoping it won't come to that, it would be a little



But yeah, if I don't figure it out easily I will do it your way, thanks
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-14-2011, 11:59 AM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
Ok quick update, I put a border around everything and this was the result:

http://imageshack.us/photo/my-images/851/scrshot.png/

Nothing appears to be affecting it in terms of margin/padding, or am I wrong? If not is there anything else you can think of that would affect it?
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-14-2011, 01:33 PM Re: Site has dipped down a few pixels...
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
I don't see the problem. It seems to be aligned properly. It would be more helpful with a link to your site. However, one can see the address of your site in the picture but I cannot see any problem with it there either.

If you have already solved it, then great, otherwise I think you'll have to be a bit more descriptive of what the issue actually is.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 07-14-2011, 01:40 PM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
Well Mattias, when I originally applied the theme the white section beneath the address bar and above the wrapper was not there, it aligned perfectly with the top of the page. I know it doesn't look too bad but I would rather it went back to being that way.
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-14-2011, 02:04 PM Re: Site has dipped down a few pixels...
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Aha, now I see the issue in your image. However, when I view your site (in Chrome and IE9) it looks correct. So it probably only shows up in some browsers/versions.

Nevertheless, you may be able to fix it by adding a closing </div> tag
Check out the validator: http://validator.w3.org/check?uri=ht...Inline&group=0
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 07-14-2011, 05:03 PM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
*Facepalm!*

Haha must have deleted it whilst I was editing the footer!

Unfortunately though it didn't realign my site! I'm starting to get desperate now!
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-15-2011, 04:20 AM Re: Site has dipped down a few pixels...
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Hmm, well as I said it looks fine in my browsers so I can't really debug it. The only thing I can think of is setting vertical margin and padding to 0 for the html and body tags.

html,body { margin: 0; padding: 0; }

EDIT: I see you have already done that :P However, I see you've set margin to auto for your wrapper. I don't know if it will change anything, but try setting the margin for the wrapper to

#wrapper { margin: 0 auto; }
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.

Last edited by lizciz; 07-15-2011 at 04:22 AM..
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 07-15-2011, 08:55 PM Re: Site has dipped down a few pixels...
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I don't see the problem either, have you fixed it? Let's not forget that there is a thing called MARGIN COLLAPSE, which is not a bug, that can cause the behavior you describe and is easily fixed.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-17-2011, 06:10 AM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
Quote:
Originally Posted by lizciz View Post
I see you've set margin to auto for your wrapper. I don't know if it will change anything, but try setting the margin for the wrapper to

#wrapper { margin: 0 auto; }
Good idea but I already tried this and it didn't work. Thanks for carrying on trying though I really appreciate it.

LadyNRed - I'm going to brush up on collapsing margins and see if I can link it to the cause of this problem, I'll let you know how it goes.

Thanks again peeps
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-17-2011, 07:14 AM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
I don't believe it!!!

After spending hours scouring my CSS and HTML for a solution I suddenly wondered what it would look like on a browser where I wasn't signed in as admin to the site. So I opened Chrome incognito, went to the site, and there was no problem! It was literally only me that was seeing it anyway!

I'm so sorry to have wasted your time with this! I still don't understand why it happened though...
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-17-2011, 04:21 PM Re: Site has dipped down a few pixels...
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
In that case, it most likely isn't a CSS issue. Perhaps there is just some data (a space, new line, <br /> tag, <p> tag or whatever) being printed when you're logged in. Just check the source code.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 07-20-2011, 10:38 AM Re: Site has dipped down a few pixels...
Angelosanto's Avatar
Webmaster Talker

Posts: 554
Name: Danny Angelosanto
Trades: 0
Well the size of the gap is suspiciously similar to the wordpress admin bar that usually goes across the top so maybe that had something to do with it...
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Reply     « Reply to Site has dipped down a few pixels...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.43197 seconds with 12 queries