Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Proper CSS format for IE + Other browsers (IE compatibility)

    Ok, so I'm having some problems getting my site to look how I want. The formatting appears correctly in all browsers (I think) but in IE it's horribly messed up. This is my first site that I'm making just to learn some things and I don't know much CSS at all. I've tried reading up but am not sure how to properly use CSS to make this work cross browser capable. Basically, I want my text box search bar properly centered along with my logo and the "advanced search" and "preferences" links. I painted over some stuff for privacy heh. In FireFox, it looks like this ( http://img261.imageshack.us/img261/9625/ex1hu0.jpg ) but in IE, it looks like this ( http://img523.imageshack.us/img523/4631/ex2sm7.jpg ). So basically in IE the search bar and what not is aligned too high! How can I use CSS to make it looks like it does in FireFox, in all browsers!? I learn best by example so thanks much for any help!!!

    My probably terrible code is as follows
    Code:
    <table>
      <tr>
        <td valign="middle">
    	<a href="/home"><img src="logo.jpg"></a>
        </td>
    
        <td valign="middle">
    <form id="SearchBarForm" action="search.php" method="get">
    	<input type="text" name="q" size="30" maxlength="150" value="'.($q).'" title="Search">
    
    	<select name="FTS"> <!-- FTS = File Type Selections -->
    
    	<option value ="File_Type">File Type</option>
    
    	</select>
    	<font size=-1><input type="submit" name="Submit" value="Search"></form></font>
        </td>
        <td nowrap>&nbsp;&nbsp;<a href=/advanced_search.phpf>Advanced Search</a><br>&nbsp;&nbsp;<a href=/preferences.php>Preferences</a>
        </td>
      </tr>
    </table>

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Posts
    495
    Thanks
    0
    Thanked 82 Times in 80 Posts
    Code:
    <style type="text/css">
    form {margin:0;} 
    td {vertical-align:top;}
    </style>
    Why use tables for layout?


  •  

    Posting Permissions

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