function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Div to link to Custom Objects

Hi all, 


I'm very green in terms of VisualForce development, and I have a question regarding linking div's from a VF page to custom objects. I haven't been able to find the answer online because my page is slightly different. I'll explain: 


On my VF page, I have created six separate boxes (using div classes). The six boxes give the title of an object and what the object is used for. Essentially, this VF page is acting as my landing page. Each box has a different background color, text, etc. What I need to do is turn the entire box into a link that will take the user to an object I specify. I don't want just words within the box to be the link to the object, but the ENTIRE div box to act as the link. 



Any help on this would be greatly appreciated. 

Sridhar VenkateswaraluSridhar Venkateswaralu

try enclosing the div tag with <a> tag.


Thanks for the reply, but I found the issue (rookie mistake). I was trying to use an <a> tag around div. This isn't possible without getting into Javascript. To get around it, I just replaced my div tag with a Span. Worked like a charm.