Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Custom Object

conorchaney
Contributor III

Hi 

I have a custom object that displays if a DDE criterion is met. 

The Problem - The code is pushing the entire record layout over to the right side, I think it is because of the padding attributes - see below image

conorchaney_0-1629294836813.png

 

My Code 

 

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div {
  margin-bottom: 15px;
  padding: 4px 12px;
}


.warning {
  background-color: #ffffcc;
  border-left:solid #ffeb3b;
}
</style>
</head>
<body>


<div class="warning">
  <p><strong>Warning!</strong> Some text...</p>
</div>

</body>
</html>

 

 

If I remove the this piece of code the problem goes away, but my warning message formatting is compromised:

 

div {
  margin-bottom: 15px;
  padding: 4px 12px;
}

 

is there a way to keep the formatting of my message while not breaking the layout of the record?

 

1 ACCEPTED SOLUTION

Accepted Solutions

DavidPetty
Archer Employee
Archer Employee

@conorchaney, drop the <!DOCTYPE html>, <html>, <head>, <meta> and <body> tags.  They are not needed in custom objects.

Try changing the div to span.

 Advisory Consultant

View solution in original post

1 REPLY 1

DavidPetty
Archer Employee
Archer Employee

@conorchaney, drop the <!DOCTYPE html>, <html>, <head>, <meta> and <body> tags.  They are not needed in custom objects.

Try changing the div to span.

 Advisory Consultant