XF 2.0 How can Image auto center?

Kent D

Active member
i have add these code on extra.less buts still not working
#1
CSS:
.bbImage{
    text-align:center !important;
}
#2
CSS:
.bbImage {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}
 

nocte

Well-known member
The second approach should work. Tested it with a Thumbnail attachment in a thread.

Maybe try max-width: 50%;
 

nocte

Well-known member
oh, try:

CSS:
.bbWrapper .lbContainer.lbContainer--inline {
    text-align: center;
    width: 100%;
}
.bbImage {
    max-width: 50%;
}
should work for this purpose. But may have side-effects..

or:

CSS:
.bbWrapper .lbContainer.lbContainer--inline {
    width: 100%;
}
.bbImage {
    max-width: 50%;
    display: block;
    margin: 0 auto;
}
 
Top