Jump to content

Wrong when viewed in IE


Niixie

Recommended Posts

Hey peeps, i got a problem with my CSS code.

 

When viewed in Firefox it looks right, but when i look at it in IE it's totaly fucked up!

 

Its supposed to be a red background with text in it, but its just text spread all over the top of the screen. Can you help me?

 

This is my CSS code for the part thats wrong;

error {
    font-size: smaller;
    background-color: #ff0000;
    padding: 5px 10px 5px 10px;
    margin-top: auto;
    position:absolute;
}

Link to comment
Share on other sites

I assume nobody knows?

that's an interesting assumption, considering you posted this an hour ago.

 

do you have it on line somewhere. i am pretty much some more things and needed to say what is wrong.

 

By the way if you have a class of error. put a dot in front of it  .error{property:xxx;}

Link to comment
Share on other sites

I assume nobody knows?

that's an interesting assumption, considering you posted this an hour ago.

 

do you have it on line somewhere. i am pretty much some more things and needed to say what is wrong.

 

By the way if you have a class of error. put a dot in front of it  .error{property:xxx;}

 

Sorry and thanks for asking.

 

Its not a class, but a "function", the line that calls it looks like this

 

echo '<error>ERROR '.$errorid.': '.$errors[$errorid].'<br /><center><a href='.CurrentURL().'>Close</a></center></error>';

 

Its from my php function.

Link to comment
Share on other sites

a proper doc type declaration will solve alot of your cross browser issues.. do you have one set?

 

also you may need to reset all the margins and padding at the beginning of your code.. so that your positioning code will be more accurate in each browser

Link to comment
Share on other sites

also:

 

Unless i am unaware of it <error> </error> doesn't seem valid to me

Can't you instead use a <span class="error">  and put the code inside that

and in css do:

 

.error{
  yourproperties:xxxx;
}

 

Do you have this somewhere online? so we can have a look...

Link to comment
Share on other sites

Yes, and i've searched ALOT, and now i got the one that validated my site green with w3 validator :)

 

Its

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

 

 

 

also:

 

Unless i am unaware of it <error> </error> doesn't seem valid to me

Can't you instead use a <span class="error"> but the code inside that and in css do

 

.error{
  yourproperties:xxxx;
}

 

Do you have this somewhere online? so we can have a look...

 

No its only localhost, sorry. :)

-I'll try to make it span insted.

Link to comment
Share on other sites

whats the parent element of this error element?

 

its at the top of the screen because its set to absolute positioning and I'm betting that your "intended" parent element is not set to be relative.

 

yea i've never heard of an <error> element so i'm assuming thats wrong for sure.. <div id='error' name='error' class='error'>Something like this maybe</div>

Link to comment
Share on other sites

I changed it to div now, no more <error></error>.

 

But now all the other stuff is pulled to the left side of the screen when box is appering?

 

do you have this somewhere online (so we can see what you do), also why do you make it a div?? a div is a block element. if you want to stick with a div give it a float.

and again i recommend a span, because this is probably only for some error message.

Link to comment
Share on other sites

it's the docytype which is not first in the browser, also the error message is outputted above it. right click view source to see it. IE jump it to quirks mode if the doctype is invalid or not at the very top

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.