• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CEP panel - Margins different in AE and Chrome browser

Engaged ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

Hi
I'm making a CEP panel and I have this simple html:

<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8">
		<meta name="viewport">
		<title>Title</title>
	</head>
	<style>
		body {
			margin: 0px;
			padding: 0px;
		}
		.button {
			margin: 0px;
			padding: 0px;
		}
	</style>
	<body>
		<div>
			<input class="button" type="image" width="20" height="20" src="images/image.png"/>​
			<input class="button" type="image" width="20" height="20" src="images/image.png"/>​
			<input class="button" type="image" width="20" height="20" src="images/image.png"/>​
		</div>
	</body>
</html>

If I preview it in chrome it will get the correct margin of 0. But when i view the panel in AE it gets a margin of 3.
What am I doing wrong? Shouldn't Chrome render the same way as the CEP panels?

 

All the best
Jakob Wagner

 

TOPICS
Scripting

Views

284

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Apr 22, 2020 Apr 22, 2020

Just realized I can set the margin to a negativ value to achieve a 0 margin.

Votes

Translate

Translate
LEGEND ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

No, it shouldn't. This is even documented in the relevant docs for Chromium of for that matter Mozilla/ Firefox. Browsers use invisible margins and different origins for their rendering all the time and conversely the CEP engine may have a standard built-in padding to accommodate frames, separators or simply prevent UI elemnts from overlapping.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

OK. Thank you for replying.

Do you know how I can get a margin of 0? Or are you saying that wont even be possible?

- Jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

LATEST

Just realized I can set the margin to a negativ value to achieve a 0 margin.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines