Welcome Guest, Not a member yet? Register   Sign In
CI adding margin/padding at top of page?
#1

[eluser]esset[/eluser]
I have the wierdest issue.

Take a look at this page: http://mstportalen.se/test.html

Now take a look at the exact same code, but loaded via a standard CI view: http://mstportalen.se/



Why is the header DIV being pushed down? *confused*

Thanks in advance
#2

[eluser]KingSkippus[/eluser]
[quote author="esset" date="1279648713"]I have the wierdest issue.

Take a look at this page: http://mstportalen.se/test.html

Now take a look at the exact same code, but loaded via a standard CI view: http://mstportalen.se/



Why is the header DIV being pushed down? *confused*

Thanks in advance[/quote]

In the http://mstportalen.se/ version, you have some non-renderable character in front of your DOCTYPE declaration. Check your view and make sure that there is nothing being rendered between the DOCTYPE line and the top of your page.

Looking at the DOM, whatever is wrong is causing your link declaration to fall down into the body instead of staying up in the head. I wouldn't have thought an invalid DOCTYPE delcaration could cause that, but I dunno, I don't see anything else.
#3

[eluser]esset[/eluser]
I just can't find it. Can you see the faulty character? Should this be rendered by CI you mean?

Because in my VIEW I just have that code you see that the page renders. Also why is it working outside of CI in a regular HTML page?


Thanks for the help
#4

[eluser]KingSkippus[/eluser]
Firefox doesn't show the character in the source, but Chrome does. If you have a copy of Chrome, load http://mstportalen.se/ in it, do a View Source, and you'll see a dot, the non-renderable character, in front of your DOCTYPE declaration.

Perhaps it would be useful if you pasted the top few lines, through the DOCTYPE declaration, of the view code you're using in a [code][/code] block.
#5

[eluser]esset[/eluser]
Dude nice find. Thank you.

Now I just have to find where this stupid "." comes from... must be one of the CI files b/c my view's don't have it.
#6

[eluser]esset[/eluser]
Something in my view was wierd, I couldn't find it but if I copied the HTML over to a clean new file it worked.

So wierd. Thank you so much for finding it.
#7

[eluser]KingSkippus[/eluser]
Glad I could help. Smile




Theme © iAndrew 2016 - Forum software by © MyBB