Edit block selectors being "pushed" down 45 pixels

Permalink 1 user found helpful
I have this weird problem with a custom theme I've created. The edit block selectors are being "pushed" down approximately 45 pixels. You can still select the gray area and bring up the context menu, but it is troublesome for skinny or overlapping blocks.

View the attached photo for what it looks like.

It happens in Google Chrome, Firefox, IE - doesn't matter. The theme displays correctly and everything else works.

PS - Sorry if this has already been discussed, I have no idea what to call this problem so I couldn't find much on the forums.

View the site design at:http://www.smwc.edu/distance

1 Attachment

glockops
 
argvader replied on at Permalink Reply
argvader
I had a similar issue with a custom template. Mine was related to using position: relative on the body.

I didn't look at your css but that could be a start.

Good luck.
ScottC replied on at Permalink Reply
ScottC
make sure you don't have inherited margin. Concrete5 doesn't like a lot of styles being assigned to the body, so you might have a margin-top: in there that is inherited or something of that sort.
glockops replied on at Permalink Reply
glockops
Thanks for the suggestion!
I added the following to my body tag in my template file.
<body <?php global $c; if ($c->isEditMode()) { echo 'style="position: absolute; top: -46px; left: 0; "'; } ?>>

It worked!
ScottC replied on at Permalink Reply
ScottC
i thought you meant the block clicker itself, not the entire body. I read it wrong, gave the wrong answer, you meant what I thought you meant, so it all worked out :)

for everyone else this code works well, there is also some other code around on the forum and definitely in the "LazyDays" theme.
SpeedBump replied on at Permalink Best Answer Reply
SpeedBump
I also just ran into this problem (the Add to and Edit gray area shifting down)- problem went away when I removed the "position:relative" property from my body tag.
tgriffin replied on at Permalink Reply
tgriffin
ahhh - adding that php to my body tag solved it for me too. THANKS!
glockops replied on at Permalink Reply
glockops
Thanks for that!
Removing position:relative fixed my problem.