0

enter image description here

I want this type of table in email template but i can't use or . how we create this standard table by using css and html.

5
  • please frame your question properly.
    – Avijit Das
    Apr 11, 2017 at 11:54
  • want to create a page block. In email template with HTML and CSS as Pageblock is not supported in it.
    – ajay rawat
    Apr 11, 2017 at 11:57
  • In that case use HTML table to achieve this functionality.
    – Avijit Das
    Apr 11, 2017 at 11:59
  • But I want the same look and feel as shown in the image.
    – ajay rawat
    Apr 11, 2017 at 12:01
  • 1
    All of that is possible using CSS and HTML. Remember that a browser or email client doesn't know or understand Visualforce.
    – crmprogdev
    Apr 11, 2017 at 12:34

1 Answer 1

1

Nobody is going to write a HTML file for you. :)

When you render a Visualforce page in your browser, the browser doesn't know whether its a visualforce page or any other type. From the browser's POV, its just a HTML file.

So you can also design a similar looking page in HTML like you see in visualforce, yes, including PageBlock.

Here are few pointers how you can do this:

  1. Open any standard record detail page in your org and do an inspect element on the page block you see in the related list.(Right click -> Inspect Element)
  2. Go to Elements tab if not already in.
  3. You will see lots of HTML code which is responsible for the beautiful page you see in browser. Search for bPageBlock class there. Which-so-ever div is having the bPageBlock class is the counterpart of pageBlock. So you can grab that div, the whole div. You will see the tables, tr, td inside that. Copy them and use in your page!!
  4. Don't forget to copy the class definitions from the Styles window on the right/bottom.

I am posting this because it might help you to achieve the similar looking UI without using an actual PageBlock. Master the inspect element option, it will be a piece of cake!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .