[Resolved] Widget width on desktop version

Home Forums Support [Resolved] Widget width on desktop version

Home Forums Support Widget width on desktop version

  • This topic has 7 replies, 2 voices, and was last updated 7 years ago by Leo.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #302342
    Dejan

    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.

    123

    Any suggestions? πŸ˜€

    #302344
    Leo
    Staff
    Customer Support

    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.

    #302347
    Dejan

    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?

    #302357
    Leo
    Staff
    Customer Support

    Try @media (min-width:769px){ .whatever-selector{margin: auto;}}

    If not then can you provide a link to the site?

    #302445
    Dejan

    Still the same. I think that’s the widget’s problem and not GPs. πŸ™‚

    Yes, of course: https://wallstreet.si/category/borza/

    #302522
    Leo
    Staff
    Customer Support

    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.

    #302533
    Dejan

    Awesome job Leo, it works. πŸ™‚

    I appreciate your help, top notch support!

    #302537
    Leo
    Staff
    Customer Support

    Glad I could help πŸ™‚

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.