Skip to content

Instantly share code, notes, and snippets.

@BugBuster1701
Created October 16, 2013 11:05
Show Gist options
  • Select an option

  • Save BugBuster1701/7006084 to your computer and use it in GitHub Desktop.

Select an option

Save BugBuster1701/7006084 to your computer and use it in GitHub Desktop.
Responsive Hack
<?php
if ($this->addImage):
$widthMid = round($this->arrSize[0] * .8);
$heightMid = round($this->arrSize[1] * .8);
$css = <<<EOF
@media screen and (max-width: 1290px) {
#img{$this->id} {
width: {$widthMid}px;
height: {$heightMid}px;
}
}
EOF;
$GLOBALS['TL_HEAD'][] = <<<EOF
<style>
$css
</style>
EOF;
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment