Webbrowser control add style to tags already having style


In vb6 web browser control i am want to set style property for backgrpund color.I am doing it as shown below

If P.getAttribute("name") = "mybookmark" Then P.Style.cssText = "background-color:#FFFFEB" End If

But if i do this then it overrides the style properties if any are there already. for example if a html tag with <A name="mybookmark" style="font-size:12px">abc</A> exists then my code will remove existing style add background color property. So how to add style property for existing one?


Add to the existing style rather than replace it :)

P.Style.cssText = "background-color:#FFFFEB;" & P.Style.cssText


  • BackColor is not changing even though conditions are met
  • Subset data using information from a different data frame [r]
  • Cookies not getting set in c#
  • Use style property of an element as condition in if or for loop javascript
  • Disabling checkbox selections in VB .NET 2008 Winform Listview
  • How to redirect error to a Text file in VBS
  • Cannot disable UltraGrid cells
  • How can I get karma browser's to use a dark theme?
  • iTextSharp - very large table memory leak
  • addEventHandler() in a loop has unexpected results
  • Google Contacts API get phone number (PHP)
  • WPF DataGrid lost focus after row delete
  • jParallax trouble
  • Function JavaScript : on Menu CSS HTML
  • What is the equivalent of Android permissions in iOS development? [duplicate]
  • Facebook Messenger Platform - Detect user typing
  • Matplotlib save file as JPEG encoder error
  • Android Chronometer starts and stops but carries on counting when stopped
  • Caret disappears when the background of a textbox is gray in wpf
  • Is it safe to drop the -webkit vendor prefix from the css3 border-radius yet?
  • is it possible to insert a line break in this tooltip?
  • garbled css name when styling within UiBinder
  • Excel VBA How to populate a multi-dimensional (3d) array with values from multiple excel ranges?
  • How to create two column output from a single column
  • How can I get the choice “H2” back in the H2 consol?
  • Floated image with variable width and heading with background image
  • Approximate Order-Preserving Huffman Code
  • Position: fixed nav does not stay fixed
  • Access variable of ScriptContext using Nashorn JavaScript Engine (Java 8)
  • ViewController With Transparent Background Entering Current ViewController With Push Transition
  • How can I speed up CURL tasks?
  • Listbox within Listbox and scrolling trouble in Windows Phone 7 Silverlight
  • Google Custom Search with transparent background
  • Android fill_parent issue
  • Repeat a vertical line on every page in Report Builder / SSRS
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Change an a tag attribute in JavaScript based on screen width
  • jquery mobile loadPage not working
  • Unanticipated behavior
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?