Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-05-2007, 11:17 PM   PM User | #1
Sigurney
New to the CF scene

 
Join Date: Oct 2007
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Sigurney is an unknown quantity at this point
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>
Sigurney is offline   Reply With Quote
Old 10-06-2007, 10:33 AM   PM User | #2
Fang
Regular Coder

 
Join Date: Jun 2004
Posts: 495
Thanks: 0
Thanked 82 Times in 80 Posts
Fang is on a distinguished road
Code:
<style type="text/css">
form {margin:0;} 
td {vertical-align:top;}
</style>
Why use tables for layout?
Fang is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:19 PM.


Advertisement
Log in to turn off these ads.