Since you can't run javascript there, you have to not send that div in the first place for it to be invisible in the text-mode browser.
You can make a server side user-agent check and do not render that div. Lynx user agents: http://www.useragentstring.com/pages/Lynx/