Results 1 to 2 of 2

Thread: webbrowser control to use css file?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    webbrowser control to use css file?

    Hi,

    I have several web browser controls on my form. I don't want to have in the content any styling like font etc because this is controlled by my css in my dynamic website. However I would like to format my browser using the same css as my website so they look very similar. Is there a way to assign a css file the the web browser control in vb.net?

    Thanks for any help,

    Jiggy!

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    Re: webbrowser control to use css file?

    Quote Originally Posted by Jigabyte View Post
    Hi,

    I have several web browser controls on my form. I don't want to have in the content any styling like font etc because this is controlled by my css in my dynamic website. However I would like to format my browser using the same css as my website so they look very similar. Is there a way to assign a css file the the web browser control in vb.net?

    Thanks for any help,

    Jiggy!
    Why not simply point to your CSS file of your web site?

    For example, load the following (of course with some actual content) from a vb.net project and point to an external css file
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html lang="en-us">
    <head>
     <link href="http://kevininstructor.home.comcast.net/~kevininstructor/vbforums/ksg.css" 
           rel="stylesheet" type="text/css">
    </head>			
      <body>
    
      </body>
    </html>
    If you were using VS2008 you could experiment with the following project

    http://www.vbforums.com/showpost.php...67&postcount=8

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width