<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Style Press, Best Practices from all the Web, Build Better Websites &#187; DIV</title>
	<atom:link href="http://www.webstylepress.com/category/div/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webstylepress.com</link>
	<description>Web VS Style</description>
	<lastBuildDate>Mon, 26 Dec 2011 10:35:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>DIV Issues, Problems and Solutions</title>
		<link>http://www.webstylepress.com/div-issues-problems-and-solution/</link>
		<comments>http://www.webstylepress.com/div-issues-problems-and-solution/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 20:48:04 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DIV]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[Web Tips]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=323</guid>
		<description><![CDATA[DIV based table less websites are common (essential, precisely speaking) now a days. Web 2.0 Web style is also about DIV based Validated websites. DIV is a little bit tricky to handle than simple tables. Here are few very essential known issues which I have been facing and their solutions. Blank Line Spaces Problem Sometimes [...]<p><a href="http://www.webstylepress.com/div-issues-problems-and-solution/">DIV Issues, Problems and Solutions</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p>DIV based table less websites are common (essential, precisely speaking) now a days. Web 2.0 Web style is also about DIV based Validated websites. DIV is a little bit tricky to handle than simple tables. Here are few very essential known issues which I have been facing and their solutions.</p>
<p><span id="more-323"></span></p>
<h4>Blank Line Spaces Problem</h4>
<p>Sometimes we use blank DIV. Suppose we use a DIV of 1px height. But its empty. Its behavior in IE and Firefox will be different. To avoid that use [ &#038; n b s p ; ] or place blank gif image of 1px height in that.</p>
<h4>Top-Padding Issue</h4>
<p>Do not give top-padding to any element which is in div containing id as in example beneath:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;some-id&quot;&gt;
 &lt;div class=&quot;some-class&quot;&gt;
  text
 &lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<p>In above case top padding will be applied at class named as <em>some-class</em> and not at id named <em>some-id</em>.</p>
<h4>Content Overlaps In spite of Not Using BR (line breaks)</h4>
<p>Well, consider header, content and footer. These are three parts of website and in some cases if they just overlaps then you are missing clear both property of CSS.</p>
<p>Use clear:both; in css for every different part of website, for line break.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">~~ Header ~~
&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
~~ Body ~~
&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
~~ Footer ~~</pre></div></div>

<h4>Vertical Alignment of Content In DIV</h4>
<p>Things will be always top aligned in case of DIV.<br />
So when placing images in the center of box then you will have to use top padding for that image via CSS.</p>
<h4>UL LI List Padding Margin Problem In DIV</h4>
<p>UL, LI have default spacings (padding and margin). Whether you define these 0 in CSS or whatever, the spacing between li will be different in IE and Firefox which is not ok when you are placing two lists besides each other and you require same height for both Lists.</p>
<p>Use line-height for li distances and not padding or margin and define max-height property in CSS for UL tag.</p>
<h4>Naming Classes</h4>
<p>Start class or id names with text and not with numbers.</p>
<p>i.e.<br />
class=&#8221;<strong>nav</strong>&#8221; is ok<br />
class=&#8221;<strong>2-nav</strong>&#8221; is not ok</p>
<h4>Blocked Elements and Inline Elements</h4>
<p>Tags with default line breaks are blocked elements while tags with no default line break are inline elements. You can write inline elements in the same line but not blocked elements.<br />
i.e.<br />
DIV, p are blocked elements.<br />
strong, a, span are inline elements.</p>
<h4>Difference Between ID and Class</h4>
<p>Id is unique throughout the website. Id can not be used more than once in a web page. While you can use the same class for many tags in html.<br />
id is unique and is not repeated throughout site but class can be applied at multiple tags.</p>
<h4>Div With Blank Bottom Padding</h4>
<p>Sometimes even when we define div height and there are no breaks after that but it takes some space or bottom padding and pushes next content a little more down.</p>
<p>Use overflow hidden property at that div via CSS, containing image, data or whatever which is causing bottom blank space (this problem occurs usually in i.e.6).</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span></pre></div></div>

<h4>Float and Align</h4>
<p>mozilla firefox looks for float for alignment and not the text-align. Floating for DIV is shifting Whole DIV to right or left while aligning left or right for DIV is left or right alignment of data or content containing that DIV.</p>
<p><a href="http://www.webstylepress.com/div-issues-problems-and-solution/">DIV Issues, Problems and Solutions</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/redesign-brainstorming-keep-in-mind-before-you-redesign/" title="Redesign Brainstorming &#8211; Keep in Mind Before you Redesign">Redesign Brainstorming &#8211; Keep in Mind Before you Redesign</a></li><li><a href="http://www.webstylepress.com/protect-your-wordpress-blog-from-hotlinking/" title="Protect Your WordPress Blog From Hotlinking">Protect Your WordPress Blog From Hotlinking</a></li><li><a href="http://www.webstylepress.com/fav-icon-tutorial/" title="Fav Icon Tutorial">Fav Icon Tutorial</a></li><li><a href="http://www.webstylepress.com/robots-txt-file/" title="Robots File &#8211; Usage and Best Practices">Robots File &#8211; Usage and Best Practices</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/div-issues-problems-and-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Rounded Flexible Div Without Images</title>
		<link>http://www.webstylepress.com/rounded-div-without-images/</link>
		<comments>http://www.webstylepress.com/rounded-div-without-images/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 17:59:12 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DIV]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Web Tips]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=306</guid>
		<description><![CDATA[Nifty Corners Cube is a solution to get rounded corners without images, and this third version is build by three main components: A javascript file, named &#8220;niftycornerscube.js&#8221; A CSS file, named &#8220;niftycorners.css&#8221; The javascript calls specific for the pages Nifty Corners Cube Create Rounded Flexible Div Without Images is a post from: Web Style Press, [...]<p><a href="http://www.webstylepress.com/rounded-div-without-images/">Create Rounded Flexible Div Without Images</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/curves-without-images-nifty-cube.gif" alt="" title="curves-without-images-nifty-cube" width="300" height="77" class="alignnone size-full wp-image-307" /></p>
<p>Nifty Corners Cube is a solution to get rounded corners without images, and this third version is build by three main components:</p>
<p><span id="more-306"></span></p>
<ul>
<li>A javascript file, named &#8220;niftycornerscube.js&#8221;</li>
<li>A CSS file, named &#8220;niftycorners.css&#8221;</li>
<li>The javascript calls specific for the pages</li>
</ul>
<p><a rel="nofollow" target="_blank" href="http://www.html.it/articoli/niftycube/index.html">Nifty Corners Cube</a></p>
<p><a href="http://www.webstylepress.com/rounded-div-without-images/">Create Rounded Flexible Div Without Images</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/change-image-opacity-easily-using-css-js/" title="Change Image Opacity Easily Using CSS or JS">Change Image Opacity Easily Using CSS or JS</a></li><li><a href="http://www.webstylepress.com/css-maximum-benefits/" title="How to Gain Maximum from CSS">How to Gain Maximum from CSS</a></li><li><a href="http://www.webstylepress.com/modern-font-styles-for-websites/" title="Modern Font Styles For Websites">Modern Font Styles For Websites</a></li><li><a href="http://www.webstylepress.com/astyle-visual-css-editor/" title="Astyle Visual CSS Editor">Astyle Visual CSS Editor</a></li><li><a href="http://www.webstylepress.com/wrapping-text/" title="Wrapping Text &#8211; Breaking Text with No Spaces into New Line">Wrapping Text &#8211; Breaking Text with No Spaces into New Line</a></li><li><a href="http://www.webstylepress.com/w3c-validation-tips/" title="W3C Validation Tips and Best Practices">W3C Validation Tips and Best Practices</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/rounded-div-without-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

