News:

Join the Facebook Fan Page.

Main Menu

maximum size of images

Started by brynn, November 02, 2017, 08:51:52 AM

Previous topic - Next topic

Arantor

max-width and max-height are directives you can put into CSS, which you can tag onto almost any element to prevent its size going bigger than intended.

In this case, I'd probably ditch the settings in SMF's admin, and replace them both with CSS in your theme's index.css file:


.bbc_img {
  max-width: 1200px;
  max-height: 600px;
}


This should make it so that images in posts go no bigger than 1200px wide and 600px high, and it should retain its aspect ratio and shouldn't need anything else - and then you can remove SMF's directive and it will even work on SVG images too.

brynn

I'll give it a try.

Thanks for everyone's help and patience.  Much appreciated   :D

brynn

Actually, one last question.  Does it matter where in the index.css file, I put it? 

I see there are all sorts of different sections and categories, and probably this should go in some particular section.  And the files are probably different for each theme.  So if you could tell me what to look for, I can probably find it.

Oh, or tell me where to put it in the default/Curve theme, and I can probably figure it out for the other themes.

Or should I just make a special new little section?  (the one I'm looking at has all kinds of comments inside /*commment*/, to identify what it does.)

Thanks again

Arantor

In this case, no it doesn't matter. Other stuff can matter, but this shouldn't.

brynn


brynn

Sorry for re-opening this.  I've tried using the code you gave me.  I thought you said it would work for SVG images.  But on the first try, not working.

Here's the code I used.  I put it right at the top of index.css.  Saved, uploaded and overwrote, and also I confirmed it was overwritten.  And I changed the SMF settings (as mentioned in the op) back to zero.  I haven't changed the other themes yet, only Aqua Style theme (our default).

/* Styles for the general looks for the Curve theme.
------------------------------------------------------- */

/* brynns image size fix. */
.bbc_img {
  max-width: 800px;
  max-height: 600px;
}
/* Normal, standard links. */
a:link, a:visited


Here's a link to the message where I made the first test:  https://forum.inkscapecommunity.com/index.php?topic=815.msg5787#msg5787

Ooohhh....why are there 2 index.css files?  I had edited Themes/Aqua/index.css.  But now, after more looking around, I found....looks like the exact same file in Themes/Aqua/css/index.css.  But it didn't get edited along with the other one.

Do I need to edit both of them?  Do I have some problem indicated by having 2 of them?  Or does the Curve/default theme have to be edited, before the change starts to show up?   :o

Thanks

Shambles

Hovering over the element inspector shows you which file you needed to edit ;)


Kindred

Also, css is executed from the top down
New code should be placed at the BOTTOM/END of the file
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

brynn

Ok, thanks for the info, folks.

Trying again....

brynn

Yay!  Finally got it working.

In the end, probably won't stick with it.  But I still appreciate all your help!

Solved again :)

Advertisement: