Skip to content

Instantly share code, notes, and snippets.

@csessig86
Created August 14, 2013 23:34
Show Gist options
  • Save csessig86/6236884 to your computer and use it in GitHub Desktop.
Save csessig86/6236884 to your computer and use it in GitHub Desktop.
Reduce size of long images in the carousel and add border around it.
for (num in $('.topstory .image')) {
topstory = $('.topstory .image')[num];
topstory_image = $('.topstory img')[num];
if (parseFloat($(topstory).css('height')) > 300) {
$(topstory).css('margin-right', 'auto');
$(topstory).css('padding', '75px');
$(topstory).css('padding-top', '3px');
$(topstory).css('padding-bottom', '0px');
$(topstory).css('border', '1px solid #d3d3d3');
$(topstory).css('background-color', '#F0F0F0');
$(topstory_image).css('border', '1px solid #d3d3d3')
$(topstory_image).css('box-shadow', '0px 1px 1px 1px #ccc');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment