<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1030078" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1030078</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-crash-course#comment-1175334</link>
    <description> &lt;p&gt;LOL, its not that im particular with nationailty, I just noticed that its a dot ph,&lt;br /&gt;
also that the address is from a prepaid dial-up internet provider...&lt;br /&gt;
Its just that I seldom see links from ol&#039; phil...&lt;/p&gt;
 </description>
     <pubDate>Mon, 25 Jul 2005 14:10:59 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1175334 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-crash-course#comment-1175320</link>
    <description> &lt;p&gt;*shrug*&lt;br /&gt;
That&#039;s what came up in Google, if the person who wrote it knows what they&#039;re talking about (and they do) I&#039;m not going to question where they&#039;re from &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 25 Jul 2005 11:14:31 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1175320 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-crash-course#comment-1175309</link>
    <description> &lt;p&gt;hey that was extensive jeeves, i was wondering though, the first two links are from the philippines?&lt;/p&gt;
 </description>
     <pubDate>Mon, 25 Jul 2005 01:50:34 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1175309 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-crash-course#comment-1175294</link>
    <description> &lt;p&gt;Well first points are:&lt;br /&gt;
1. Have you got a full, valid DTD as the FIRST line of code on your pages?&lt;br /&gt;
2. As Megan said this is a hack, but only needs to be used where - in addition to the width - you need to specify a padding/border.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What the W3C Standards Say&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;(This isn&#039;t exactly what they say, but a more reader-friendly version of the &lt;a href=&quot;http://www.w3.org/TR/REC-CSS2/box.html&quot; class=&quot;bb-url&quot;&gt;specs&lt;/a&gt;  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; )&lt;/em&gt;&lt;br /&gt;
The total width of a block-level element in normal flow (i.e. a div tag with display:block; ) is:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Left Margin + Left border + Left padding + &amp;lt;strong&amp;gt;Width&amp;lt;/strong&amp;gt; + Right padding + Right border + Right margin&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is the rendered width of the block, i.e. What you will actually see on screen. The &#039;Width&#039; you supply does not include padding, border or margin.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What Microsoft Say (for IE5.x and IE6 quirks mode)&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;(Actually I ignore most things they say, this is just what I heard on the grapevine &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt; )&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The total width of a block-level element in normal flow (i.e. a div tag with display:block; ) is:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |--------------------------&amp;lt;strong&amp;gt;Equals Width&amp;lt;/strong&amp;gt;---------------------------|&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;Left Margin + Left border + Left padding + Content + Right padding + Right border + Right margin&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;In the Microsoft model padding and border are included in the width, so if you supplied a width of 200px, a border of 50px and a padding of 50px the width allocated to your content would only be 100px.&lt;/p&gt;
&lt;p&gt;So to get everything working together you need one value for browsers using the W3C box model and another value for those using the Microsoft model, enter...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Hack&lt;/strong&gt;&lt;br /&gt;
What you&#039;ve got there *sucks air through teeth like a plumber about to annouce something&#039;s going to be very expensive* is a modified SBMH (simplified box model hack). Without confusing you further, this exploits more bugs in IE to get it to behave with CSS, let&#039;s break it down:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. The Star HTML Bug&lt;/strong&gt;&lt;br /&gt;
HTML is the root of any (X)HTML document, so whilst:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;* html { ---Declarations--- }&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
Is valid, it shouldn&#039;t match to any element, there isn&#039;t anything in the document tree higher than HTML. This is the case for Opera, Firefox and even NS4, they will ignore this selector, IE - and note this is any version up to IE6/Win -  does match this successfully to the html element. So in the first part of the hack we&#039;ve created a selector that specifically targets IE, any other browser will ignore any declarations within this selector.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. A Note on DOCTYPES&lt;/strong&gt;&lt;br /&gt;
Most current browsers have a quirks and a standards mode. In this instance we are interested in Internet Explorer: IE5.x will always use the Microsoft box model, whereas IE6 will use the W3C model if it&#039;s in standards mode.&lt;/p&gt;
&lt;p&gt;The way to get a browser to work in standards mode is to include a full DOCTYPE on the first line of you code. If a browser finds this it knows you&#039;re adhering to standards and will use the W3C&#039;s box model.&lt;/p&gt;
&lt;p&gt;This causes some problems if you&#039;re using XHTML 1.1 (or higher), but that&#039;s another story &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Looking at the first line of code at CSS Zen Garden you&#039;ll see:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Strict//EN&amp;quot;&lt;br /&gt;	&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
This will make IE6 use the W3C box model when it&#039;s interpreting the CSS; the relevance of this will become clear shortly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. The Two Declarations&lt;/strong&gt;&lt;br /&gt;
Two property declarations are now needed, one for IE5.x and one for IE6. This is because both IE5.x and IE6 will use the star html selector, but IE6 is using the W3C box model and IE5.x isn&#039;t; this is where the w\idth property becomes important.&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;width: 744px;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
This is for IE5.x, all IE&#039;s (up to and including IE6) will read this but the next line overrides this property for IE6 only:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;w\idth: 724px;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
IE6 reads this and ignores the escape (backslash) character, as this property is exactly the same as the previous one, but comes later in the stylesheet, it implements the second one. &lt;strong&gt;This is the correct value according to the W3C box model&lt;/strong&gt; (hopefully the relevance of the DOCTYPE is now clear, if the DOCTYPE wasn&#039;t present or not on the first line of code only one property declaration would be required).&lt;br /&gt;
IE5.x starts reading the property, gets to the escape character, says: &quot;Eeek! What&#039;s that doing there?!&quot; Then ignores the entire property, therefore favouring the first width of 744px, if the escape character wasn&#039;t present it would do exactly the same as IE6, but we don&#039;t want that as IE5.x is using the Microsoft box model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Select Your Element(s)&lt;/strong&gt;&lt;br /&gt;
The next part is to select the precise element you&#039;re going to apply the hack to, in the case it&#039;s an element with the name &quot;container.&quot; So your completed selector looks like:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;* html #container { ---declarations--- }&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
As said: Only IE will read this selector as other browsers will not match it to an element.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Further Reading/Acknowledgements&lt;/strong&gt;&lt;br /&gt;
I gleaned most of what&#039;s said here from the following sites:&lt;br /&gt;
Modified SBMH: -&lt;br /&gt;
&lt;a href=&quot;http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html&quot; class=&quot;bb-url&quot;&gt;http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html&lt;/a&gt;&lt;br /&gt;
Star HTML Hack: -&lt;br /&gt;
&lt;a href=&quot;http://www.info.com.ph/~etan/w3pantheon/style/starhtmlbug.html&quot; class=&quot;bb-url&quot;&gt;http://www.info.com.ph/~etan/w3pantheon/style/starhtmlbug.html&lt;/a&gt;&lt;br /&gt;
W3C Box Model Specs: -&lt;br /&gt;
&lt;a href=&quot;http://www.w3.org/TR/REC-CSS2/box.html&quot; class=&quot;bb-url&quot;&gt;http://www.w3.org/TR/REC-CSS2/box.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!!!&lt;/p&gt;
 </description>
     <pubDate>Sun, 24 Jul 2005 19:35:59 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1175294 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-crash-course#comment-1175261</link>
    <description> &lt;p&gt;well ive read that you dont even need to have a box model hack to display your page correctly in all browsers, same code for all, you just need to stick it in that every code is for layout and positioning in css, the mentality is different from table layout, as mentioned in the w3c school. Anyway, if you did it correctly for one, hack your way to the other... Sequence is definitely gonna be MOZ - - Opera - - Ie&lt;/p&gt;
 </description>
     <pubDate>Sun, 24 Jul 2005 01:41:37 +0000</pubDate>
 <dc:creator>demonhale</dc:creator>
 <guid isPermaLink="false">comment 1175261 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-crash-course#comment-1175241</link>
    <description> &lt;p&gt;w\idth is a box model hack.  Do a google search for &quot;box model hack&quot; and you&#039;ll find out what I&#039;m talking about.  Baiscally, IE has an improper interpretation of how  div widths with padding &amp;amp; borders should be displayed.  There are a couple of ways to get around that and w\idth is one of them.&lt;/p&gt;
 </description>
     <pubDate>Sat, 23 Jul 2005 13:43:28 +0000</pubDate>
 <dc:creator>Megan</dc:creator>
 <guid isPermaLink="false">comment 1175241 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
