I have this css
.viewimages{position: fixed;}
which works in chrome and Mozilla but the position isn't picking in i.e instead it is floating left yet it is suppose to position itself in the center.So any help
This should be fixed by adding a doctype to the top of your HTML document, forcing the browser to be a bit more standards compliant:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Or if you're using XHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
This will work unless you are relying on quirks mode to render the page then unfortunately there's no support.
Related
#inherits VooDooBytes.Site
#{
Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
Is rendered as:
--- empty line ---
<!DOCTYPE etc...
My understanding is that this additional line can cause issues with elder versions of IE, forcing the browser into quirks mode.
This can be resolved, by putting the Layout deceleration and doctype on the same line, but that's a bit, well ugly. (although not as ugly as the transitional doctype, that was never a thing of beauty!)
You could always invert the order in which those directives are appearing:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
#inherits VooDooBytes.Site
#{ Layout = null; }
<html>
I have defined the <DOCTYPE> in jsp page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
but when opening the page in IE8 it's getting changed to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
which is causing menus issue, hover is not working.
Could you tell em why <DOCTYPE> is getting changed.
when i tried to get as InnerHTML in Javascript, Firefox giving expected results. so that i can manipulate the dom elements, bu when i use the same working code, IE will strip out the quotation marks from the attribute pair. i am wondering is there any work around to solve this problem. and if possible can any body tell me why does it renders, because of quirks mode or what ? as i have iframes in pages.
DocType which i have in my page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Expected :
<span id="someID">Ravi <span class="SomeClass">assignment </span>submission</span>
Output
<span id=someID>Ravi <span class=SomeClass>assignment </span>submission</span>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> doesn’t trigger quirks mode, it triggers standards mode just fine.
Why do the missing quotes bother you? If you want to manipulate the DOM elements, you don’t need the innerHTML string.
The CSS active link property is not working in ASP.net.
When i comment the Doctype, it starts working fine. Following is the Doctype:
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I found many doctypes but the other CSS stops working when I change.
Is there any way to use active link property with this doctype?
This is the HTML and CSS code
<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">
<head>
<style type="text/css">
a:active
{
background-color:Red;
}
</style>
</head>
<body>
w3schools.com
wikipedia.org
</body>
</html>
I would recommend using the HTML 5 doctype, <!doctype html>.
If you choose to stick with the one you're currently using, do it this way:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Please notice the ! at the beginning. You need those. :)
I am working on this personal project and the sign-in screen of the website goes completely haywire in IE-9
Can someone please suggest me how can I fix it? The webpage is at
http://www.ayeboss.com/users/login
Try opening it in FF and IE and you will see the difference.
Any inputs will be highly appreciated
Your page is being displayed in Quirks Mode, because you don't have a doctype.
Add this, the HTML5 doctype, as the very first line to resolve the problem:
<!DOCTYPE html>
You should always add a doctype to trigger Standards Mode.
well some problems with your html and some with CSS. you are trying to use CSS3 but not completly..
1st mention DOCTYPE
2nd margin and paddings are bugy in IE.. in IE the become double to normal value.
(i.e like if you set margin for Fireforx but they appear double in IE most likly.)
3rd you have use CSS3 properties ..
-moz-border-radius (it only works in FF) so if you want to see this property in action in IE .. try -webkit-border-radius. and read this article border-radius
for gradient gradient
replace your html tag with this
<!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">
If you are using html transitional use this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
If you are using XHTML 1.0 transitional go for this:
<!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">
If you never want your browser to behave as an old version. Then add this:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />