Embedded top margin

Hello,

I have an Embedded object on my page created from a 16x16 icon from my custom theme:

Embedded infoIcon = new Embedded("", new ThemeResource("img/infoIcon.gif"));

When I add it to the page, though, it seems to have about a 15px space(margin?) above the image.

I don’t have spacing/padding/margins enabled for my page Layout. When I add other types of components, I don’t get this effect.

How can I remove this space?

I’ve tried this in CSS with no luck:

.v-embedded {
	margin-top: 0px;
	padding-top: 0px;	
}

.v-embedded-margin {
	padding-top: 0px;	
}

Thanks!

The problem is in the empty string caption you specify for the Embedded component. Even empty strings are considered as content for the caption, and they reserve one line of text above the component.

So use null for the caption and the space should vanish.

Embedded infoIcon = new Embedded([b]
null
[/b], new ThemeResource("img/infoIcon.gif"));

Jouni,

Thank you!