IE7 floats and clears not working as intended - css

Have a look at this JSFiddle. I am trying to get this float layout working in IE7. Works in everything else. The two float rights should be next to each other. But in IE7 it messes up.
Any ideas on a fix? Thanks for you help.
http://jsfiddle.net/c9Wmx/4/
*updated fiddle
http://jsfiddle.net/c9Wmx/5/ <-- this works but is there any way to do this without using an empty div?

You can give width to your .page DIV. like this:
.page{
width:480px;
float:right;
}

See this updated fiddle: http://jsfiddle.net/c9Wmx/6/

if it only happens in IE you can try putting the following in the head html tags.
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Related

ie9 spacing - css not working as it should

Hi might be a simple one for someone.
I have finished working on this website and in ie9 there is a lot of line height issues - i don't even know if line height is the right word - spacing seems to imply letter spacing.
The easiest way to explain my issue is with screen shots.
Why is the 3rd one (ie9) so out?
url for the website is http://www.geckowebsolutions.co.uk
Could it be the font .eot is rending differently to the otf?
If so how can I work around this?
DanSiop
Change your headers to tell IE9 to follow the modern norms :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Do the 3 changes : the doctype, the html element and the meta.
I am not sure why it's happening (trouble shooting in IE sucks) but it's your.breadcrumbs CSS that is being affected. Quick and dirty solution is to add an IE conditional.
<!--[if IE]>
<style>
.breadcrumbs{top:11px;}
</style>
<![endif]-->

Footer with 100 % on Ipad

I need some help. I have made this side in Joomla, and cant get my footer to have a 100% width on an Ipad. Its like it wont get furder then my footer content.
Can some one please help me adding the right css?
My website is: www.webkjaer.dk
And here is the Ipad emulator
Try adding this to your website head
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

background-color: white in IE7 appears transparent

Yup, you just read that.
My Googling gave me tons of results where people wanted a transparent background, and it appeared white.
Today, I stumbled upon the opposite ! It seems to be a real bug since I was able to reproduce it in a JSFiddle : http://jsfiddle.net/qtByH/
The background-color is set to red by default, and everything works fine. If you change it to white and re-run the fiddle (using IE7, of course), the background remains transparent when you hover the link.
Any thoughts ?
Edit : here is the code in case the fiddle vanishes away.
HTML :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
Test
</body>
</html>
CSS :
body { background-color: green; }
a:hover { background-color: red; }
Well, you have an HTML document inside another HTML document, which probably makes the browser revert to quirks mode. The JsFiddle site already adds a document around the HTML code, so you should not enter a complete HTML document.
http://jsfiddle.net/Guffa/qtByH/3/
Do you have a chroma filter somewhere?
filter: Chroma(color='#ffffff');
or
filter:progid:DXImageTransform.Microsoft.Chroma(color='#ffffff');
or something like that?
A chroma filter set's a color to be transparent.
http://msdn.microsoft.com/en-us/library/ms532982(v=vs.85).aspx
See the fiddle without unnecessary html code and demo for output:
Fiddle: http://jsfiddle.net/qtByH/5/
Demo: http://jsfiddle.net/qtByH/4/embedded/result/
As pointed out in my comment, zoom: 1; was the way to go (must have been yet another hasLayout issue).

Make iframe size of browser

How can i make an iframe the absolute size of a web browser? I'm playing around with this (http://liquor.com/askmen-jardiniere/) yet whatever I do in Firebug it's showing scrollers on the right and bottom. I've set the width/height to 100% but that doesn't work, auto width/height won't work, even setting scroller="no" or scrolling="no" isn't working.
Seeking a guru to lend a hand if possible. Any help would be greatly appreciated.
[EDIT]
Aha I found the Answer (at least it seems like it):
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
</head>
<body style="paddin:0px;margin:0px;">
<iframe src="http://liquor.com/askmen-jardiniere/" scrolling="no" style="width:100%;height:100%;border:none;"/>
</body>
</html>
This is because browsers have default stylesheets and the put paddings for the Body tag.

I want to know how give the name of css selector in IE

I want to fit my website in IE .I want to know how i give the name of css selector in IE like firefox.Please help me!
i did'nt undersatnd your question "name of css selector in IE",but if you have to assign the css on selector p use like (<p>hello everyone</p>) this
p {
border:1px solid red;
font-size:24px;
}
always call your ie css file AFTER any other css so it overwrites any previous methods.
if you're still having problems, you can force a css definition to take priority with !important.
Without important, the div background would be blue, because that's the last declaration made
#mydiv{
background-color:green;
}
#mydiv{
background-color:blue;
}
now, using !important, you can force priority. the background will be green regardless of the order of declaration:
#mydiv{
background-color:green !important;
}
#mydiv{
background-color:blue;
}
if you're looking for css hacks for IE (not recommended, though sometimes essential), you can get more information from this excellent article.
hope this helps!
There is nothing wrong with the CSS code that you have shown so far, so repeating it in a style sheet specific for IE will not make any difference at all.
Generally you don't need a separate style sheet for IE. There are some rendering bugs in IE that you may have to circumvent, but that can almost always be done by tweaking the current CSS and HTML.
To find out what you need to do to make it work in IE, you should try to find the reasons for the differences. Most CSS is exactly the same, so if you don't see the effect in the page it's usually because the element is not where you think it is or doesn't have the size that you think it has. If for example the height of an element is zero, you will obviously not see it's background color.
First make sure that the page has a proper doctype, so that it doesn't render in quirks mode. This is important to make it work as close to the standards as possible in IE.
Open the error console in Firefox and view the page. It will tell you if you have any errors in the CSS code. There are standards for how to render correct code, but there is no standards for how to handle incorrect code, so if you have any errors you will get widely different results between browsers.
The plugin FireBug in Firefox is useful for seeing exactly which styles affect each element in the page, and you can even edit the CSS and see the result immediately. There is a similar tool built into IE 8 called Developer Tools. For IE 7 you can install Developer Toolbar that gives you some of this functionality. Each tool will allow you to select an element in the code and shows you exactly where it is on the page.
To fix your website in firefox and IE you can use the below methods.
Method 1:
You can use the "if condition" that you have used. You need to mention the version of IE in the if statement. See the code below
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Browser Detection Example</title>
<style type="text/css">
body{ background:blue}
</style>
<!--[if IE 6]> <!-- for ie 6 browser -->
<style type="text/css">
body{ background:red}
</style>
<![endif]-->
<!--[if IE 7]> <!-- for ie 7 browser -->
<style type="text/css">
body{ background:red}
</style>
<![endif]-->
</head>
<body>
</body>
</html>
Method 2:
You can use the css hack inside the css code itself. No need to use a separate css file. You can code in the same css. See the example below
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body{ background:blue; _background:orange;}
</style>
</head>
<body>
</body>
</html>
Note : prefix "_" before the css code it will get render in ie6...
Check out !!!
regards,
Logesh Paul

Resources