Kunena Menu
How to have certain blocks limited in width?
7 months 3 weeks ago - 7 months 2 weeks ago #76273
by agnoletti
[SOLVED] How to have certain blocks limited in width? was created by agnoletti
Hello Sir,
I want side space on a wide screen but not on a mobile device + I want the columns with content to stay in the center of the column and not on the left.
Is there a smarter way than putting empty columns right and left as I have done in the editor? Maybe putting some code in the "user.css" file?
I have attached a screenshot from the back-end to show the only solution I got working so far.
Thank you!
I want side space on a wide screen but not on a mobile device + I want the columns with content to stay in the center of the column and not on the left.
Is there a smarter way than putting empty columns right and left as I have done in the editor? Maybe putting some code in the "user.css" file?
I have attached a screenshot from the back-end to show the only solution I got working so far.
Thank you!
Last edit: 7 months 2 weeks ago by agnoletti. Reason: Put [SOLVED] in the subject
Please Log in or Create an account to join the conversation.
7 months 3 weeks ago #76297
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic How to have certain blocks limited in width?
Hi
Interesting request. May be that I would use the external margins on the block/column with % values.
Then you can also update these values in responsive mode to give smaller values, or zero to disable them
Not sure if this is what you need
CEd
Interesting request. May be that I would use the external margins on the block/column with % values.
Then you can also update these values in responsive mode to give smaller values, or zero to disable them
Not sure if this is what you need
CEd
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
7 months 2 weeks ago #76334
by agnoletti
Replied by agnoletti on topic How to have certain blocks limited in width?
I came to the desired result putting the following custom CSS code provided by ChatGPT in the text block, as shown in the attached screenshot:
& {
max-width: 400px;
margin-left: auto;
margin-right: auto;
box-sizing: border-box;
}
& > *,
& .inner,
& .cktype {
max-width: 400px !important;
margin-left: auto !important;
margin-right: auto !important;
box-sizing: border-box;
}
@media (max-width: 768px) {
& {
max-width: calc(100% - 40px);
margin-left: 20px;
margin-right: 20px;
}
& > *,
& .inner,
& .cktype {
max-width: 100% !important;
}
}
& {
max-width: 400px;
margin-left: auto;
margin-right: auto;
box-sizing: border-box;
}
& > *,
& .inner,
& .cktype {
max-width: 400px !important;
margin-left: auto !important;
margin-right: auto !important;
box-sizing: border-box;
}
@media (max-width: 768px) {
& {
max-width: calc(100% - 40px);
margin-left: 20px;
margin-right: 20px;
}
& > *,
& .inner,
& .cktype {
max-width: 100% !important;
}
}
Please Log in or Create an account to join the conversation.
7 months 2 weeks ago #76337
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic How to have certain blocks limited in width?
thank you for sharing the solution
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
Time to create page: 0.186 seconds





