#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0

    Not Working in IE, fine in Firefox


    Gods I hate IE. I test this in IE6 and it comes out completely wrong. Here's the CSS:

    Code:
    body  {
    	font: 90% Verdana, Arial, Helvetica, sans-serif;
    	background: #666666;
    	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    	padding: 0;
    	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    	color: #000000;
    	background-color: #FAFBFB;
    	background-image: url(images/mainbackground.gif);
    }
    
    /* Tips for Elastic layouts 
    1. Since the elastic layouts overall sizing is based on the user's default fonts size, they are more unpredictable. Used correctly, they are also more accessible for those that need larger fonts size since the line length remains proportionate.
    2. Sizing of divs in this layout are based on the 100% font size in the body element. If you decrease the text size overall by using a font-size: 80% on the body element or the #container, remember that the entire layout will downsize proportionately. You may want to increase the widths of the various divs to compensate for this.
    3. If font sizing is changed in differing amounts on each div instead of on the overall design (ie: #sidebar1 is given a 70% font size and #mainContent is given an 85% font size), this will proportionately change each of the divs overall size. You may want to adjust based on your final font sizing.
    */
    .twoColElsLtHdr #container { 
    	width: 100%;  /* this width will create a container that will fit in an 800px browser window if text is left at browser default font sizes */
    	background: #FFFFFF;
    	margin: 0px;
    	border: 0px;
    	text-align: left; /* this overrides the text-align: center on the body element. */
    	background-image: url(images/mainbackground.gif)
    } 
    .twoColElsLtHdr #header { 
    	background: #DDDDDD; 
    	padding: 0px;  
    	background-image:url(images/bg.jpg);
    	width: 100%;}
    	 
    .twoColElsLtHdr #header h1 {
    	margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
    	padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    }
    
    /* Tips for sidebar1:
    1. Be aware that if you set a font-size value on this div, the overall width of the div will be adjusted accordingly.
    2. Since we are working in ems, it's best not to use padding on the sidebar itself. It will be added to the width for standards compliant browsers creating an unknown actual width. 
    3. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".twoColElsLtHdr #sidebar1 p" rule.
    */
    .twoColElsLtHdr #sidebar1 {
    	float: left; 
    	width: 200px;
    	background-image:url(images/bg.jpg);
    	padding-left: 5px; /* top and bottom padding create visual space within this div */
    	height:400px;
    }
    .twoColElsLtHdr #sidebar1 h3, .twoColElsLtHdr #sidebar1 p {
    	margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
    	margin-right: 10px;
    }
    
    /* Tips for mainContent:
    1. If you give this #mainContent div a font-size value different than the #sidebar1 div, the margins of the #mainContent div will be based on its font-size and the width of the #sidebar1 div will be based on its font-size. You may wish to adjust the values of these divs.
    2. The space between the mainContent and sidebar1 is created with the left margin on the mainContent div.  No matter how much content the sidebar1 div contains, the column space will remain. You can remove this left margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends.
    3. To avoid float drop, you may need to test to determine the approximate maximum image/element size since this layout is based on the user's font sizing combined with the values you set. However, if the user has their browser font size set lower than normal, less space will be available in the #mainContent div than you may see on testing.
    4. In the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs that may occur.
    */
    .twoColElsLtHdr #mainContent {
    	margin: 0 1.5em 0 13em; /* the right margin can be given in ems or pixels. It creates the space down the right side of the page. */
    	margin-top: 0px;
    	margine-right: 400px;
    	padding-top:0px;
    	position:absolute;
    	left: 50px;
    	top: 145px;
    	max-width: 700px;
    	min-width: 700px;
    	background-color:#d5d4b5;
    	padding:10px;
    	border-color: #420000;
    	border-style:solid;
    	border-size: 5px;
    	min-height: 380px;
    }
    As you can see, I am mostly working off of modified DW scripts. If you can help me solve this problem, I will definitely appreciate it.

    The code:

    Code:
    <body class="twoColElsLtHdr">
    
    <div id="container">
      <div id="header">
        <img src="images/banner.jpg" width="986" height="122" />
        <table width="100%" height="26" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td background="images/linething.gif">&nbsp;</td>
          </tr>
        </table>
      <!-- end #header --></div>
      <div id="sidebar1">
        <table width="200" border="0" cellpadding="0" cellspacing="0" background="images/bg.jpg">
          <tr>
            <td><img src="images/home.gif" width="75" height="39" /></td>
          </tr>
          <tr>
            <td><img src="images/gallery.gif" width="91" height="43" /></td>
          </tr>
          <tr>
            <td><img src="images/Pricing.gif" width="98" height="42" /></td>
          </tr>
          <tr>
            <td><img src="images/request_quote.gif" width="179" height="45" /></td>
          </tr>
          <tr>
            <td><img src="images/care.gif" width="61" height="41" /></td>
          </tr>
          <tr>
            <td><img src="images/faq.gif" width="80" height="49" /></td>
          </tr>
          <tr>
            <td><img src="images/tutorials.gif" width="114" height="45" /></td>
          </tr>
          <tr>
            <td><img src="images/about_us.gif" width="116" height="47" /></td>
          </tr>
          <tr>
            <td><img src="images/contact.gif" width="125" height="41" /></td>
          </tr>
        </table>
        <h3>&nbsp;</h3>
      <!-- end #sidebar1 --></div>
      <div id="mainContent">
        <p class="style1 style1 style1 style1 style1 style1">First and foremost, welcome. Here resides Valdyr Fenrisdottir, custom mascot and fursuit designer. It is my personal desire to help people obtain a wonderful costume and make dreams come true. It is with this desire that I have started Fenrir Productions, my contribution to the world of fursuit creation.</p>
        <p class="style2 style2 style2 style2 style2 style2">Whether you seek a mascot for your school or organization, a mask for an event or game, or a partial or full fursuit for yourself or a friend, I devote myself to making a high-quality product to fit your specific needs. I will even make smaller peices, like ears, paws, feetpaws, and tails for those interested in accessories for a cosplay or Halloween costume.</p>
        <p class="style3 style3 style3 style3 style3 style3">Please feel free to browse around the website, and be sure to check back for more updates. Questions and comments  are always welcome, so if you need anything, please e-mail or contact me.<br />
            <br />
        </p>
        <div align="center"><span class="style4 style5 style5 style5 style5 style5"><strong>News and Updates:</strong></span>
          <!-- end #mainContent -->
        </div>
      </div>
    	<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />
    	<!-- end #container -->
    </div>
    </body>
    </html>
    And the website link, as I forgot it, so you may view the problem:

    http://fenrirproductions.com/anim/index.html
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Welcome to DevShed Forums, Valdyr.

    CSS is pretty much useless without the X/HTML it's used with. Please post your X/HTML too.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0
    Doing so now Sorry about that, its late and I've been designing all day.
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Don't worry about it. A lot of newcomers forget that.

    1) What, if anything, is before your <html> tag? In other words, what doctype are you using?

    2) Why did you apply the same class to some elements multiple times?

    3) That navigation should be marked up as an unordered list.
    I suggest you learn how semantics apply to X/HTML. Semantics is really a very important subject when it comes to X/HTML.

    These three articles explain how to style lists.
    http://www.alistapart.com/articles/taminglists/
    http://css.maxdesign.com.au/listutorial/
    http://www.webreference.com/programming/css_lists/

    4) IE6 doesn't support max-width, min-width, max-height, or min-height. IE7 does when it's in standards mode.

    I recommend you read these:
    Internet Explorer and the Expanding Box Problem
    Min-Height for IE/Win
    The overflow declaration
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0
    1:
    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">
    2: I just saw that myself, and my only answer for you is: dreamweaver did it.

    3: Will that really help my odd stretching problem?

    4: So is there an override for this, or is there not, or is it listed in your given links?
  10. #6
  11. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    1) Ah. The DW default.

    2) *shakes head and chuckles*

    3) No. The point is to use proper markup.

    4) No, but there are some workarounds. Here are some other ones:
    http://www.webreference.com/programming/min-width/
    http://www.pmob.co.uk/temp/min-width-ie.htm
    http://www.svendtofte.com/code/max_width_in_ie/
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0
    I noticed that it doesn't seem to matter so long as I don't use that code. Do you think it is absolutely crucial TO use the min-height, et cetera? While it does keep things looking even, I must admit it is a terrible pain in the butt.

    Man, I make ugly websites. Having a really hard time putting the style I want into a business-type site...
  14. #8
  15. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Have you considered using a min-height in browsers that support it and just not bothering to add a workaround for IE6?
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0
    It being a business website, wouldn't that cause a massive loss of customers?
  18. #10
  19. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Why would it? That's a fairly minor thing. Most people won't look at the page in multiple web browsers.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0
    Originally Posted by Kravvitz
    Why would it? That's a fairly minor thing. Most people won't look at the page in multiple web browsers.
    But what of the people still using IE 6? If they see this wonky website, would that not turn them away?
  22. #12
  23. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    It might. So make it look descent in IE6. (I was talking about the specific case of using min-height on mainContent.)

    Setting the max-width and min-width to the same thing is silly. Give #mainContent width:700px.
    Last edited by Kravvitz; November 30th, 2007 at 03:42 AM.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2007
    Posts
    7
    Rep Power
    0
    Ooh, okay. And yeah, I did that. It works well in firefox, but IE6 doesn't entirely obey it. At least its not running across the screen, though.

IMN logo majestic logo threadwatch logo seochat tools logo