Jump to content

Strange Div Problem In Ie


Kingy
 Share

Recommended Posts

Hey guys,I've whipped up a quick login/registration page, and I've got 2 separate divs on this page.One for registration and another for logging in, I've floated them and used a div below itwith clear: both to make sure they stay next to each other. This is fine on Firefox, Operaand IE on local testing. But when I upload the files to the server, it looks fine on Firefox and Opera,but the page plays up in IE. Like the divs don't line up and some of the spacing in the page goes kind of weird too.I find it strange that when you test it locally it is fine, but when it's uploaded to the server and testedonline it messes up. I've made sure my files are up to date so what is going wrong there?http://cpulse.dmu.ac.uk/login.html

Link to comment
Share on other sites

You should know that a transitional doctype will cause spacing problems in IE.You probably have more divs that you need. That .clear div at the top of your column is exactly the kind of kludge that CSS is designed to eliminate.All those <br /> elements after your list items! If you want your list items on separate lines, don't float them. If you're trying to get rid of the marker, there is a property for that. As with table rows, there is no content area between list item. I mean this:<li>stuff</li>not a content area<li>etc.A <br /> there (or anything else) could be rendered differently by every browser that is trying to understand the error.The Phone/mobile: <li> element is followed by an opening tag, not a closing tag.Validator turns up 44 errors in all. A lot are just repetitions of the <br /> thing.

Link to comment
Share on other sites

Probably worth mentioning that the unordered list and list item elements are not the correct elements for formatting the form elements. Use a label to mark up the text associated with each form field and place each coupling within a div, which has a naturl block-level display type, which place each form field and label on a new line. DD is completely correct, remove those <br /> tags, add spacing with CSS.Example:<div class="row"><label for="name">Name</label><input id="name type="text" /></div>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...