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

XF 1.1 Define image from url size?

Claudio

Well-known member
#1
Hi,

I'd like to know if I can define a specific size for all images from a URL.
Actually, I'm having this question due this image which is really big and I want to define the size of the preview of it on xenforo:
 

Claudio

Well-known member
#6
Add to EXTRA.css:
Code:
.bbCodeImage {
max-width: 100px !important;
max-height: 100px !important;
}
mmm I think I'm having problems with APC due I've made few changes to the style and they aren't reflected. However, I haven't set APC on config.php
 

Claudio

Well-known member
#7
Add to EXTRA.css:
Code:
.bbCodeImage {
max-width: 100px !important;
max-height: 100px !important;
}
Brogan,

I tried the code above but it doesn't work.
No matter what I set, the following code is displayed by xenforo:
Code:
.bbCodeImage {
max-width: 100%;
}
 

Tracy Perry

Well-known member
#9
Brogan,

I tried the code above but it doesn't work.
No matter what I set, the following code is displayed by xenforo:
Code:
.bbCodeImage {
max-width: 100%;
}
If it's not working, double check your EXTRA.css and make sure that you have all your closing "}" in place. It gets me occasionally even now.
 

Claudio

Well-known member
#10
If it's not working, double check your EXTRA.css and make sure that you have all your closing "}" in place. It gets me occasionally even now.
Thanks for the suggestion. However, I have the same code that Brogan suggested but I made it 50% to notice the change (because I don't see any):
Code:
.bbCodeImage {
max-width: 50% !important;
max-height: 50% !important;
}
As I said, the code doesn't work on my forum (and I'm using a default style) with only style properties customized
 

Brogan

XenForo moderator
Staff member
#12
It's not a ticket issue.
You just need to enter the code correctly.

Using a browser inspection tool I can't see the code anywhere.

I just changed it to 10%:

upload_2013-6-30_19-12-10.png
 

Claudio

Well-known member
#13
It's not a ticket issue.
You just need to enter the code correctly.

Using a browser inspection tool I can't see the code anywhere.

I just changed it to 10%:

View attachment 50265
I tried to move the code from the bottom of extra.css to the very beggining and then it worked, so as Tracy suggested, a } was missing in other part of Extra.css (I thought he was referring to the } on the code you provided Brogan.
[quote="Tracy Perry, post: 574412, member: 30804"make sure that you have all your closing "}" in place.[/quote]

Thank you both of you!
 

Tracy Perry

Well-known member
#14
I tried to move the code from the bottom of extra.css to the very beggining and then it worked, so as Tracy suggested, a } was missing in other part of Extra.css (I thought he was referring to the } on the code you provided Brogan.
[quote="Tracy Perry, post: 574412, member: 30804"make sure that you have all your closing "}" in place.

Thank you both of you!
If moving it to the top made it work then you were missing a closing } on one of your statements. If you haven't already, be sure to filter back through your EXTRA.css to find it (I use a Mac and the editor I use also allows me to find missing closers like this in a .css file easily).
 

Claudio

Well-known member
#16
If moving it to the top made it work then you were missing a closing } on one of your statements. If you haven't already, be sure to filter back through your EXTRA.css to find it
That was what I noticed after checked that it was working :)
Notepad++ is a great free editor and allows you to easily spot errors such as that.
Yes, I use it but my extra.css has only 40 lines and it's to less to worth the time to open the app, copy the code and check it :cautious: