why can’t I normally set the dimensions of my logo to indicate that it is 1.5 ram high and 100% wide so as not to shrink…??? (via custom css)
Can you share the custom css you tried to apply?
height: 1rem;
max-width: 100%;
Hi,
It is true that you can not currently set rem for height, however you should be able to do that with CSS.
You can already set max width to 100% without CSS. You could use width:auto and max-width:100%. Then just add: height: 1rem as css. Please see my screenshot. Note: 1rem is about 16px;
So if you set the image width as above, the image will spread across the container its in, meaning the container that contains the image will define the width of the image.
Yes, yes, that’s right! I understand what you’re talking about, I did it and I did the same thing as you in the screenshot. I actually want to use the height in my logo, which is svg and inserted through the image element, and the width is not 100% of the container, that is, so that it always scales normally and decreases and is not flattened by other elements…
I’m not sure if I understand what you mean by flattened. Here is a video with the above settings using an SVG image. Can you share your example?
If you want to use original height of image that scales; you would need to use min height as the original height of the logo and height: auto
Here is an example of a logo with original 60px height that scales up. Width is set to auto:
Thank you, I think it will help me…sorry for my English through translator… another question is can I upload a text file and write my css for global styles in it how can I do this? more precisely, how would it be better through embed or tag head?
Great question! Here’s how you would add a css stylesheet to WeWeb: Add global css styles to your WeWeb project - YouTube