1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Keep the max width set @300pxls, for all embedded images?:

Discussion in 'Styling and Customization Questions' started by CritiKiL, May 5, 2012.

  1. CritiKiL

    CritiKiL Active Member

    In order to maintain a bordered mobile-view experience, how can I make sure that all embedded thread/post images are no larger than 300pixels WIDTH? Not talking about uploaded, but embedded images. For example this image (embedded) is larger than 300pixels 'wide':


    I would want images to show as only 300pixels 'wide' Maximum, because if viewing through a mobile skin this would stretch the page of the mobile-view...
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Add to EXTRA.css:

    .bbCodeImage {
    max-width: 300px !important;
    DSF and CritiKiL like this.
  3. CritiKiL

    CritiKiL Active Member

    Ok, this works for all template 'except' the mobile-view template ;-(. I've put the same code into the EXTRA.css for that template as well and nothing changes. Any ideas? I'm using the XFS Mobile skin template...

    [​IMG] [​IMG]
  4. mrGTB

    mrGTB Well-Known Member

    Most likely I'd say because that CSS is not being pulled and used in mobile theme. That would be my guess?

    Sorry, just spotted it's a BBCode used.
    CritiKiL likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Check the CSS used for that style.

    I had a look at your site but I found it impossible to find the style switcher.

    If you can link to a thread with an image for that style I may be able to help.
  6. CritiKiL

    CritiKiL Active Member

    Style-Switcher is only for Registered members and is in their membercard and profile area, but here is the link for you:

    After you switch to 'mobile-view' then here is a thread link with a large image:
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Can you link to a post with an image?
    Everything I click on states I must be registered to view it?
  8. CritiKiL

    CritiKiL Active Member

  9. DSF

    DSF Well-Known Member

    Thanks Brogan ;) ... perfect.
  10. CritiKiL

    CritiKiL Active Member

    Brogan, please forgive me. When I'm not signed in this code does nothing, but when I did sign in it works perfectly! Honest mistake as I did not know the state of being online or off would make any difference with the changes.

    Now, is there a way to just make all images take this action 'without having to sign in?' Or maybe I should just make the forum unviewable without registering/loging in? ;-) And, Thank you once again ;)
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That shouldn't affect it unless the style changes as a result of logging out in which case you need to apply that CSS change to both styles.
    CritiKiL likes this.
  12. CritiKiL

    CritiKiL Active Member

    I know Jake, but those two side-by-side pics above is actually with the code on both styles and when not signed in. It was only when I decided to sign in and 'see' that I noticed the code worked all along. So I just changed the group permissions for non-registered's to not see a users posts and that way they won't see the enlarged files unless they register/login, which at that point the code would be working. It's strange but that's what's going on. This is how it looks when signed in now, so I'm happy though:

    [​IMG] [​IMG]

Share This Page