Widget blank space when no data

WorkingHands
Tera Expert

Hi,

I have a custom widget running along the top of my portal to display announcements like this:

find_real_file.png

The issue that I have is that when there is no data to show there is a small white space showing where the widget would be.  I don't believe this is anything to do with the widget itself (I've tried using ng-hide) but rather the container on the page.

find_real_file.png


I've used chrome dev tools to inspect the styling but I can't see what the element is exactly, it doesn't look like padding/margin.  It's just an empty space of some sort.

Any idea how I can remove this?

1 ACCEPTED SOLUTION

WorkingHands
Tera Expert

I figured out the issue has to do with the page.  I've added the following CSS.  The margin-top: -1px seems to have gotten rid of the blank space:

section.page, main.body {
    padding: 0px;
  margin-top: -1px
}

View solution in original post

3 REPLIES 3

Shane41
ServiceNow Employee
ServiceNow Employee

Hi there,

Are you using the OOTB announcements widget or have you developed your own version?

In my personal instance (on Rome release) the OOTB announcements widget displays at the very top

find_real_file.png

When its dismissed there is no white space

Kind Regards,

Shane

 

Hi Shane, it's a custom widget.  We don't want the OOTB announcement banner as it has some limitations we're trying to overcome, such as the ability to carousel.

WorkingHands
Tera Expert

I figured out the issue has to do with the page.  I've added the following CSS.  The margin-top: -1px seems to have gotten rid of the blank space:

section.page, main.body {
    padding: 0px;
  margin-top: -1px
}