3
What is the best way to centralize objects within a div horizontally and vertically, being a responsive div with no fixed size, with width and Eight in %. Div is inside a bootstrap Row
div class="Row"> div class="col-Md-6"> div class="Here-this-my-div">
I do not know the edge pq, but tbm did not work.
– Clayton Furlanetto
the edge just to see where the div is. Then you can take it off. Put part of the code there in the question to help. This code I put is already well beaten, many people do so and it works, must be another detail. Fix this style right into the div you want to format, to make sure that the formatting will not be affected by any other css. And after it works, move the formatting to some other css rule.
– Alexandre Cavaloti
But so it didn’t work, I supplemented the question with some data that may be relevant, see there.
– Clayton Furlanetto
I put it directly in div =div style="position:Absolute;margin: auto;top: 0; left: 0; bottom: 0; right: 0;" class="gallery-photos"> Even so it didn’t work, it continued in the upper left corner.
– Clayton Furlanetto
If the div you are formatting is inside other Ivs with bootstrap (Row and col), you can center using column formatting. Ex. div Row; div empty col-3; div with col-6 content ; div empty -col- 3
– Alexandre Cavaloti
I don’t want to centralize DIV ROW I want to centralize another div I created inside Row = div class="Row"> div class="col-Md-6"> div class="Here-this-my-div">. I created an image gallery in the div but I can’t leave it centralized see prntscr.com/gis1ik
– Clayton Furlanetto
I included in the answer another example where the screen was divided with bootstrap and the div was centralized using other formatted div
– Alexandre Cavaloti
It didn’t work here, look how it turned out http://prntscr.com/git97u
– Clayton Furlanetto
Does the green area have to be centralized? If so, probably the question is centralizing a higher object.
– Alexandre Cavaloti
What has to center is the div with the images, it has to center within the green area. This green area is the Row lg-6 and I made a div inside it with the images, the brown part is another col where will have the description. I want aligned Vert and Horiz nothing solves kkkk and I’m not an expert yet. See http://prntscr.com/gitfbi
– Clayton Furlanetto
Try to put this CSS in the DIV you want to center:
-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);transform:translate(-50%,-50%);left:50%;top:50%;
... Maybe this DIV has to haveposition:relative;
tb.– Sam
Look at this Fiddle: https://jsfiddle.net/hLdcx55e/
– Sam