1

I am working on a website in which the background color gets yellow in an input search form as shown below while selecting any item from the history of items searched from the 1st input search bar from the placeholder what are you looking for..

enter image description here

HTML:

The HTML code which I have used in order to make the above input search bar is:

<div class="input-searchicon">
   <input class="form-control search_ruckify mb-4" type="text" name="filter[keywords][keywords]"
      placeholder="what are you looking for..." required>
   <span class="fa fa-search searchicon" aria-hidden="true "></span>
</div>

CSS:

.input-searchicon input
{
text-align: center;
}



Problem Statement:

I am wondering what CSS codes I need to add so that on selecting an item from the history of items searched, there is no yellow background color.

Amjad Rehman A
  • 788
  • 10
  • 21
flash
  • 1,455
  • 11
  • 61
  • 132

1 Answers1

0

To check you are in quirks mode

In Firefox and Opera you can determine if your browser is in "quirks mode" by checking page info.

Using document.compatMode, will tell you the mode you are in with most browsers.

In Chrome, Safari, and IE, run this javascript in the address bar:

javascript:window.alert('You are in ' + (document.compatMode==='CSS1Compat'?'Standards':'Quirks') + ' mode.')

(note that you'll need to re-type the javascript: portion after pasting into your address bar, due to recent security changes)

If you are in Quirk mode the issue is identified. It will be ok when you host the project.

Solution:

In other words, all browsers needed two modes: quirks mode for the old rules, strict mode for the standard. IE Mac was the first browser to implement the two modes, and IE Windows 6, Mozilla, Safari, and Opera followed suit. IE 5 Windows, as well as older browsers like Netscape 4, are permanently locked in quirks mode.

Choosing which mode to use requires a trigger, and this trigger was found in ’doctype switching’. According to the standards, any (X)HTML document should have a doctype which tells the world at large which flavour of (X)HTML the document is using.

  • Old pages written before (or in spite of) the standardization wave don’t have a doctype. Therefore ’no doctype’ would mean quirks mode: show according to old rules.
  • Contrarily, if the web developer was savvy enough to include a doctype, he probably knew what he was doing. Therefore most doctypes trigger strict mode: show according to pure standards.
  • Any new or unknown doctype triggers strict mode.
  • The problem was that some pages written in quirks mode did have doctypes. Therefore each browser has its own list with doctypes that trigger quirks mode. See this browser comparison chart for an overview of these lists.
Amjad Rehman A
  • 788
  • 10
  • 21