Jekyll site loads css correctly when not in a default.html, now broken

Hiya,

So I was following the “turn a html site into Jekyll” guide, and I’ve run into a weird problem I don’t know how to solve or understand. Basically, before I turned my index.html into a default.html, building and serving my site would load my css/html perfectly fine. Now, after converting it to a default format and using an index.md, the css loads correctly for a split second before breaking and looking completely incorrect.

Does anyone know why this would be the case? my html is pretty basic, as is the CSS, and Im not sure why it would load things fine before swapping to default.html as per the guide and still loading correctly for a split second :S

Apparently putting the DOCTYPE HTML thing actually was messing up all my code, rip

EDIT: Ensure you have the CORRECT UNITS in your css (i.e, no 0’s by themselves, make them 0px or whatever you’re using) so the DOCTYPE doesn’t break it.

1 Like

You are a LEGEND!!! I was “converting” a website to jekyll for better management and my form’s textboxes were overflowing from a div although I gave them 100% of the div and the div was taking 50% of the body/container area. This issue was not present previously and I didn’t know why it was happening. I just removed <!DOCTYPE html> as you said and it solved the issue.