Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full width images #8

Open
rapsli opened this issue Apr 8, 2017 · 1 comment
Open

full width images #8

rapsli opened this issue Apr 8, 2017 · 1 comment

Comments

@rapsli
Copy link

rapsli commented Apr 8, 2017

Hi

Are there ways (classes) to make images to stretch over the full width of the screen?

@rapsli
Copy link
Author

rapsli commented Apr 9, 2017

This code would do the job. Unfortunately I'm not too familiar with all the front-end workflows, e.g. I'm posting the raw code here.

$(document).ready(function(){
    $('.full').each(function(){
        var height = $(this).height();
        if ($(this).parent().prop('tagName') == 'P') {
            $(this).parent().next().css('margin-top', height + 100 + 'px');    
        }

        else {
         $(this).next().css('margin-top', height + 100 + 'px');       
        }
        
    })    
})
article img.full, article iframe.full {
    position: absolute;
    left: 0;
    width: 100%;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant