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.
-
please frame your question properly.– Avijit DasApr 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 rawatApr 11, 2017 at 11:57
-
In that case use HTML table to achieve this functionality.– Avijit DasApr 11, 2017 at 11:59
-
But I want the same look and feel as shown in the image.– ajay rawatApr 11, 2017 at 12:01
-
1All of that is possible using CSS and HTML. Remember that a browser or email client doesn't know or understand Visualforce.– crmprogdevApr 11, 2017 at 12:34
1 Answer
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:
- 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)
- Go to Elements tab if not already in.
- 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 thebPageBlock
class is the counterpart ofpageBlock
. 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!! - 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!