710
Views
12
Comments
Solved
 still image size
Question

Hi,


I have a question. I need to have an image on the screen, but I don't want the size of the container to change regardless of the size of the image. More simply, I need the presentation to be a fixed size


Outsystems 11

Capturar.PNG
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Lucas,

This is all plain CSS, so googling will get you a long way. See e.g. this (first hit I got).

2020-05-07 18-53-00
Rui Barradas
 
MVP

Hello Lucas,

You can define a class with the width and the height that you want in the style sheet (CSS) and apply that class in the container that encloses the image.


Kind regards,

Rui Barradas

UserImage.jpg
Lucas Silva

Rui Barradas wrote:

Hello Lucas,

You can define a class with the width and the height that you want in the style sheet (CSS) and apply that class in the container that encloses the image.


Kind regards,

Rui Barradas

Hi, Rui

Does it work if I apply this CSS directly to the image? fixing the container he created a scroll bar.


2021-09-10 14-03-53
Salman Ansari

Lucas Silva wrote:

Hi,


I have a question. I need to have an image on the screen, but I don't want the size of the container to change regardless of the size of the image. More simply, I need the presentation to be a fixed size


Outsystems 11

Hi Lucas,


you can do like below.

.container {
    width:100px;
    height:100px;
    background-position:center;
}


2022-06-20 10-22-18
Nabeel Khan

Thanks Brother, It helped me alot.


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Lucas,

This is all plain CSS, so googling will get you a long way. See e.g. this (first hit I got).

UserImage.jpg
Lucas Silva


when I apply the sizes, the image looks like this, I don't want this bar to be

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Lucas, did you check the link I posted? Did you set the image's max-width to 100% in CSS?

UserImage.jpg
Lucas Silva

Kilian Hekhuis wrote:

Lucas, did you check the link I posted? Did you set the image's max-width to 100% in CSS?

Sorry, the post appeared later. I'll check the link.

UserImage.jpg
Lucas Silva


I applied 100% but continue this bar

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Can you share a Module with this problem?

UserImage.jpg
Lucas Silva

Thank you for help! Problem solved!

I was putting the class in another image, Now it worked

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Ok, great you got it solved! :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.