<iframe src="/apex/ItemsForToday?isComp=1&showAll=0" frameborder="0" width="100%" height="300px"></iframe>
Here you can see the HTML code that I used to embed my Visualforce page into the home tab component of type HtmlArea. After saving this, I went back to my home tab to see my new product. Sadly, it only gave my component maybe 60px of height! (scrollbar-ing the rest) What happened?
After investigation, it seems that there is a Salesforce CSS style that is overriding the height attribute on this iframe. The quick and easy solution that I came up with is this:
<iframe src="/apex/TaskUserPrioritiesManager?isComp=1&showAll=0" frameborder="0" width="100%"
Just add a CSS style directly on the iframe tag. This style has a more specific scope than the one Salesforce is using, so ours takes precedence. Now, when returning to the home tab, I see that my VF page is looking proud on my homepage.
No comments:
Post a Comment