[personal profile] pixellated
this issue is solved! turns out aspect-ratio works just fine on DW, i was just not using it correctly so the problem was in front of the keyboard and not in the code, haha

here's what i originally posted:
hi again! this is more of a general html/css question, but it has to work within dreamwidth's constraints, so i decided to ask it here. please let me know if this isn't the appropriate comm for this. i hope i used the right tags for this post.

here's what i'm trying to achieve (this would be displayed inside the most recent entry on my journal, so i can use regular CSS and not just inline, in case this matters):


i want to have a big box, and inside it a picture and a small box below that. i want the big box to resize responsively while keeping its proportions: suppose its width:height ratio is 1:2; i want it to keep that ratio always. as it resizes, i want the picture and small box inside to also resize while also keeping their proportions.

normally this would be really easy to do with aspect-ratio (<- this is a link to mozilla's developer resources) but that property doesn't seem to work on dreamwidth -- when i put it in my custom CSS, it doesn't seem to do anything, and it gets highlighted in red. (it works okay when i try it in online CSS editors, so i think it's not my mistake that's causing this.)

assuming this is true and i can't use aspect-ratio on DW, i need to cobble together some other solution, but i'm completely out of ideas. is this possible to achieve without aspect-ratio, or should i just change my idea to something that can be done on DW?

thanks again for your time!
[personal profile] lumemiruuuuuuuuuuu
ive been using the code to put images since nothing else worked tbh, and to host the images ive been using catbox, and everytime i try to upload a gif there and put it here the image doesnt appear sadly ;-;, if u know how to solve this ty!!!
[personal profile] prue84
Hi all. :)

I've just made the final step to import LJ to my dead DW account. I don't wish to bother with installing a custom style and picked "Argyle" theme from the ones available.

I just occurred into an issue that makes me go mad.

For years, LJ didn't resize the images in your entries, so if you have a pic bigger than the container (or even your screen), you just got the horizontal scrollbar.
Recently, though, LJ started to auto-resize them and in my LJ style they get resized to 500px. Aspect ration is respected. I was then forced to modify all my posts to add a link for the fullsize (xx_original.jpg) pic.

I should also note that in the html for the entry I always specify the width and height of every image.


On DW, though (or, at least, in the style I'm using) there is no resize. I tried to manually the code seen here and then add some variations of

.entry-content img {
max-width: 99%;
height: auto;
}


in the custom css, changing from "99%" to "100%" or "500px". Anyway, the point is that aspect ration is never respected, the image keeps the original height and therefore the images gets stretched.
Same post: on LJ and on DW. (put the max-width to 500px so you can visibly see the difference).

A research on google didn't help, the code above should be apparently enough. Is there any way to force the aspect ration to be mantained on my theme? I don't really want to edit every single post to change the width and height values (and doing calculations for every single image so to respect ration - see, open every image in image editor, scale to 500 and note down the new height value) and, at this point, I'm too much used to the image resized that I don't want to see the original size in the entry anymore.

I use Argyle for Crisped. My account is free.


Thank you. :)
[personal profile] tropicsbear
Is it possible to set a maximum image width for your layout in your CSS? Sometimes some of my DW friends post huge images that take forever to load.

Thanks in advance for any help!

Profile

Dreamwidth style system discussion

October 2025

S M T W T F S
   1 234
567891011
12131415161718
19202122232425
262728293031 

Syndicate

RSS Atom

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 18th, 2025 09:02 am
Powered by Dreamwidth Studios