Page 1 of 1

Stuck with a grey border around my image

Posted: 08 June 2025, 19:10
by Gauben
I'm sorry if this is an easy one but I can't find the answer anywhere. I was trying to get rid a grey border around my image and tried everything, I'm sure the reason is simple but I can't find it. I even changed my code to the one below to make an empty image and the grey border is still there. The grey border appears between the padding and the content and this is how i generate my images:

for (let p = 0; p < plateCount; p++) {
dojo.create('img', {
/*class: 'plate-icon',*/ <-------- This is the css that applies the real image which is commented out for testing with no css style.
style: {
width: '100px',
height: '100px',
}
}, plateContainer);
}

Thanks!

Re: Stuck with a grey border around my image

Posted: 08 June 2025, 21:06
by RicardoRix
try using the F12 developer console and the 'select/inspect' feature. Should help dig down to the bottom of any problem.

Re: Stuck with a grey border around my image

Posted: 08 June 2025, 22:10
by Gauben
Yes I did, that's how I could see that this grey "line" was between the content and the padding, and not actually the border. I went through all the information and styles in the console and could not find where that grey border comes from.

Re: Stuck with a grey border around my image

Posted: 09 June 2025, 00:37
by Gauben
Fixed! Seems like making a 'div' instead of an 'img' got rid of it. Must have been an automatic border on the empty dojo created 'img' that was stuck there even if i added the real image with a css style after.