Basic CSS debugging in Internet Explorer 8 using compatibility mode -


okay, i'm not doing fancy here, it's driving me crazy can't work.

i'm having trouble button formatting on form, in internet explorer 7.

i have simple form:

<div id="menusearch">      <form id="searchform" method="get" action="process.php">         <div>             <input type="text" value="" name="s" id="s_name" class="input_text"  />             <input type="submit" class="button submit" accesskey="s" value="" />         </div>     </form> </div> 

the css button follows:

#menusearch .button {     margin: 0;     width:97px;     height:30px;     background-image: url('images/search.png');     background-repeat:no-repeat;     background-position:left top;     border: none; } 

the background image simple button image, in internet explorer 7 it's showing standard default button without image. works in every other browser i've tried in. appreciated.

now, i'm using internet explorer 8 (compatibility mode) , developer tools check out , see what's going wrong , i've noticed weird. lines of css, seems ignoring them. in above example, developer tool shows follows:

background-image: url(images/search.png); border-bottom-style: none 

and it's showing 1 line without tick boxes, it's not recognizing separate css rules. can find other places in css i'm using background-image fine , other places i've set borders well. i've copied , pasted on css code , still same errors.

what doing wrong?

edit

okay, i've stripped down , found problem in document type declaration,

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> 

i remove it, , works. then, need change original question following: should document type declaration be? i've never understood different ones , have used same one...

so, trimmed down source code requested:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">     <head>         <style type="text/css">             #menusearch .button {                 margin: 0;                 width:97px;                 height:30px;                 background-image: url('http://www.netbsd.org/images/download-icon-orange.png');                 background-repeat:no-repeat;                 background-position:left top;                 border: none;             }         </style>     </head>     <body>         <div class="hspace">             <div id="mspace">                 <div id="menu">                     <div id="menusearch">                         <form id="searchform" method="get" action="process.php">                             <div>                                 <input type="text" value="" name="s" id="s_name" class="input_text"  />                                 <input type="submit" class="button submit" accesskey="s" value="" />                             </div>                         </form>                     </div>                 </div>             </div> 

i've left off document type declaration.

the fix in case remarkably simple. change border, this:

border: 0 solid #000 

and it's fixed. knows why, ie7 crazy.

you can keep original doctype.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -