Welcome Guest, Not a member yet? Register   Sign In
How much time do you spend coding for IE
#13

[eluser]SomeFunkyDude[/eluser]
It is a pain dealing with IE, but using a lot of css is necessary if you want a more detailed layout. One of the main problems with IE is it's interpretation of the box model (margin/border/padding). There's a couple tricks for having your page display right. One is to apply your padding to a content div that's wrapped within another that is simply a wrapper, the content div will expand to fill the parent div, but applying padding or margin to it will help you control the way it looks across multiple browsers.

You can also check out resets to override default browser settings, YUI has one and I know there's a a few other out there.

Also, if your having trouble aligning things, consider this, text-align:center is applied to the body which centers everything in IE but not FF or safari, margin auto is applied to a "wrapper" div which centers the div in FF or safari, but not IE. The only problem with this, is applying text-align:center to the body centers all the text, to get around this, you'll need to use text-align:left or whatever alignment you want, for each box that has content.

Code:
<html>
<head>
<style type="text/css">
body {
background:#000044;
text-align:center;
}
#wrapper {
width:400px;
background:#FF0000;
color:#FFF;
margin-left:auto;
margin-right:auto;
}
#content {
padding:20px;
text-align:left;
}
</style>
</head>
<body>

<!-- the wrapper div sets the with the box, the content box fills it, which you can then apply margin or padding -->
<div id="wrapper"><div id="content">Sed tempor facilisis tortor. Duis turpis massa, pellentesque eu, lobortis eget, pellentesque non, mi. Aliquam commodo mi non libero. Maecenas eleifend. Nunc rutrum purus in sem. Curabitur tempus faucibus nisi. Integer varius nisl non neque. Maecenas cursus. Etiam accumsan lectus quis justo. Proin egestas lacus non eros. Maecenas a libero. Donec ullamcorper libero vitae odio. </div></div>


&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
How much time do you spend coding for IE - by El Forum - 04-13-2009, 08:38 PM
How much time do you spend coding for IE - by El Forum - 04-13-2009, 09:23 PM
How much time do you spend coding for IE - by El Forum - 04-13-2009, 09:29 PM
How much time do you spend coding for IE - by El Forum - 04-13-2009, 11:23 PM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 01:39 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 03:43 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 04:55 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 05:06 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 05:33 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 05:48 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 06:37 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 07:44 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 08:24 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 08:41 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 08:44 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 08:46 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 09:17 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:02 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:06 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:07 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:08 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:11 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:15 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:19 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:20 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:24 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:28 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:30 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:34 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:39 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:42 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:49 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:50 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:56 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 11:05 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 11:05 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 11:15 AM
How much time do you spend coding for IE - by El Forum - 04-14-2009, 10:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB