Dialogs Appearing off page

Permalink
For some reason with my latest build using 5.7 for a client. The block dialogs are displaying off the page, I have to inspect element and take down the "top:" to be able to make changes to the block.

I tried clearing the browsers cache and Concrete5's cache. With no luck. I'm using Chrome.
"<div id="ccm-menu-click-proxy" class="ccm-menu-item-hover" style="top: 1403px; left: 770.5px; width: 360px; height: 468px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px;"></div>"

As you can see the top that is rendered is crazy. Does anyone know how to fix this?

Thanks,

Tom

 
Tom0 replied on at Permalink Reply
Okay, this is a strange one and it really concerning me.

When I use the default theme everything is loading fine. When I use my theme dialogs appear off screen.

I went through deleting all the includes, bootstrap.css/bootstrap.js and so forth nothing is working, they still appear off page.

I tried the same on a fresh install incase it was the content effecting it and it was still doing the exact same.

I'm so confused to what is causing this.

Anyone have any ideas?

Thanks,

Pulling my hair out.
Tom0 replied on at Permalink Reply
Okay, I'm an idiot. I found the cause of it, but if anyone makes a rookie mistake like me. Here is the problem:

Not defining the DOCTYPE
Make sure you have <!DOCTYPE html>

Otherwise dialogs will display off the screen. Though I'm surprised that was the only issue I ran across.
andrew replied on at Permalink Reply
andrew
hah, interesting – would not have expected that. Good to know.
PixelFields replied on at Permalink Reply
PixelFields
I had the same issue with dialogs appearing offscreen, but I had already declared the doctype. Found my issue was that <?php Loader::element('header_required'); ?> was before the <head> tag - dialogs appeared in their normal positions as soon as I moved that code to sit just after the <head> tag like this:

<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!DOCTYPE html>
<html lang="<?php echo Localization::activeLanguage()?>">
<head>
<?php Loader::element('header_required');?>

... rest of the meta data etc </head>