Archived topic
Widget width on desktop version
7 replies · Started by Dejan on April 5, 2017
Hello,
I've used width:inherit; for a widget so it could be compatible on tablet and mobile versions. But the problem is my desktop version of the site is fixed at 1200px and the widget is stretched now.

If I use margin:auto; for a widget, the desktop version will be just fine, but the mobile and tablet versions would be stretched.

Any suggestions? :D
Hi there,
Maybe try making the code desktop only? You can do something like this:
@media (min-width:769px) {
CSS here
}
Let me know if this helps.
Sorry, I don't really understand that. What CSS code should I put in? margin:auto;?
The widget allows me this space for CSS code. Or should I put it in plugin Simple CSS?

Try @media (min-width:769px){ .whatever-selector{margin: auto;}}
If not then can you provide a link to the site?
Still the same. I think that's the widget's problem and not GPs. :)
Yes, of course: https://wallstreet.si/category/borza/
Try this CSS:
.stock_ticker.stock_ticker_1 {
max-width: 1200px;
margin: auto;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know.
Awesome job Leo, it works. :)
I appreciate your help, top notch support!
Glad I could help :)