112
Views
12
Comments
Solved
a gap between the container and the image
Service Studio Version
11.53.26 (Build 61617)

Hello,

I placed an image in a container but there is a little gap between the container and the image though it is specified with a width of 100%.

Why there is this issue and how to resolve it please?

Css.oml
2022-09-05 08-23-51
Naveen N
Solution

@Guillaume Le Devin Check this one, I think you are looking for this one.

@Guillaume Le Devin I am attaching the URL for your reference, hope this will help you. 

@Guillaume Le Devin  For 1st image attached in the stylesheet comment the css, for 2nd and 3rd image uncomment it.

css_naveen.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

briljant, @Naveen N ,

I spent some time last night, but couldn't figure out how to put the rounded border on the picture without distorting it.  solution is changing the object-fit to cover, nice.

I think, as you can now put the border on the image, it can be removed from the parent div.  To make it 3px instead of total of 6px.

Dorine

2022-09-05 08-23-51
Naveen N

@Dorine Boudry We can do that, I just gave @Guillaume Le Devin a solution , he can customize it based on his bussiness requirements.

2022-07-26 07-14-23
Guillaume Le Devin

Thank you, so much @Naveen N, for your help.

Is there any chance you would help me to understand why there is a little space between the yellow border and the black bottom area please?

2022-09-05 08-23-51
Naveen N

@Guillaume Le Devin That space is because of the percentage you used , for that cases you can use pixels to adjust as per your requirement. Attaching a oml for your reference.


Css_naveen.oml
2022-07-26 07-14-23
Guillaume Le Devin

Thank you so much for your answer and your help.

I am going to take a look at it. :-)

2022-04-19 13-20-22
Andrea Lembo

Hi,

the containers has a fixed width:

If you remove that class your image fill the entire width.

Br,

AL

2022-07-26 07-14-23
Guillaume Le Devin

Thank you for your answer.

I need a width otherwise it you look like this image


I just need to get rid of those gaps, visible in the image


Would it be a bug from Outsystems?

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

The issue is not related with borders it is regarding the overflow property and border radius
I have made changes to your CSS and fixed it 
I am attaching the updated oml that  might help.

https://personal-wwkmlamd.outsystemscloud.com/Css/Screen1?_ts=638049335362666030

Thanks & Regards
Tousif Khan

Fixed CSS.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

that's not really an improvement, the image is now distorted because you set the height of it.

2023-10-21 19-42-11
Tousif Khan
Champion

My intension was to tell them what causing the error and what is the main issue over here

we can control the behavior of the image by using CSS properties and fix the distortion
also by applying some css properties

ref :https://developer.mozilla.org/en-US/docs/Learn/CSS/Howto/Fill_a_box_with_an_image
However thanks for pointing this :)

Tousif Khan

2022-09-05 08-23-51
Naveen N
Solution

@Guillaume Le Devin Check this one, I think you are looking for this one.

@Guillaume Le Devin I am attaching the URL for your reference, hope this will help you. 

@Guillaume Le Devin  For 1st image attached in the stylesheet comment the css, for 2nd and 3rd image uncomment it.

css_naveen.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

briljant, @Naveen N ,

I spent some time last night, but couldn't figure out how to put the rounded border on the picture without distorting it.  solution is changing the object-fit to cover, nice.

I think, as you can now put the border on the image, it can be removed from the parent div.  To make it 3px instead of total of 6px.

Dorine

2022-09-05 08-23-51
Naveen N

@Dorine Boudry We can do that, I just gave @Guillaume Le Devin a solution , he can customize it based on his bussiness requirements.

2022-07-26 07-14-23
Guillaume Le Devin

Thank you, so much @Naveen N, for your help.

Is there any chance you would help me to understand why there is a little space between the yellow border and the black bottom area please?

2022-09-05 08-23-51
Naveen N

@Guillaume Le Devin That space is because of the percentage you used , for that cases you can use pixels to adjust as per your requirement. Attaching a oml for your reference.


Css_naveen.oml
2022-07-26 07-14-23
Guillaume Le Devin

Thank you so much for your answer and your help.

I am going to take a look at it. :-)

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