5
I’m trying to adjust a css image on my site, and I want to extend the image on the whole screen, only for that I have to assign to my image: margin-left
, to correct the positioning of the screen.
However, the value I will assign in this field is the sum of the sequential values, which are the container margins.
$('.row').css('margin-left');
"0px"
$('.article-body').css('margin-left');
"103.875px"
$('.article-body').css('padding-left');
"18.75px"
What I want to know is if in css, I can take these values to do something like this, considering of course that these values will change with screen resizing.
element-style{
margin-left: '.article-body'.marginleft + '.article...
}
You can’t. But if the image will extend all over the screen, why not width 100%?
– Woss
I did it, but the father is limited by those shores, I set the
width: 100vw;
 max-width: initial;
to put the image in the size I want , only that the margen still plays it to the right.– Vinicius Morais
The detail is that if I put 100% the image size is limited by Row.
– Vinicius Morais
From what I understand, if I understand it, your problem is not with the margins... what you are trying to do is probably a gambit to fix another problem that you have not yet identified and that should be corrected...
– hugocsl
Yes, it’s a problem that I’m trying to fix, but I thought about this solution and since I’m a beginner in css, I was wondering if it’s possible to do this kind of thing.
– Vinicius Morais
Maybe if you put all the code in the menu and css, it’s clearer for us!
– Jonathan de Toni
My own doubt was this, I even thought to put the code of the problem itself, but it’s too much code and I would have to simplify.
– Vinicius Morais