<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Various Technical Articles to learn CSS Tricks with easy Examples</title>
	<atom:link href="https://jharaphula.com/category/programming-solutions/css-code-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://jharaphula.com/category/programming-solutions/css-code-tutorials/</link>
	<description>Blog for SEO Guest Posting, Digital Marketing or Home Remedies</description>
	<lastBuildDate>Mon, 30 Mar 2026 14:25:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>Cross Browser pure CSS ToolTip using after and before Pseudo-elements</title>
		<link>https://jharaphula.com/pure-css-tooltip/</link>
					<comments>https://jharaphula.com/pure-css-tooltip/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Sat, 28 Jan 2017 16:53:40 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Cross Browser]]></category>
		<category><![CDATA[Cross Browser friendly]]></category>
		<category><![CDATA[Cross Browser ToolTip]]></category>
		<category><![CDATA[CSS in UI designing]]></category>
		<category><![CDATA[pure CSS ToolTip]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=7206</guid>

					<description><![CDATA[<img width="300" height="185" src="https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip-300x185.png" class="webfeedsFeaturedVisual wp-post-image" alt="Cross Browser pure CSS ToolTip using after and before Pseudo-elements" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" fetchpriority="high" srcset="https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip-300x185.png 300w, https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip.png 750w" sizes="(max-width: 300px) 100vw, 300px" /><p>There are several ways to design ToolTip. You can design a tooltip using JavaScript or JQuery or CSS or BootStrap. Compare to Client Script ToolTip...</p>
<p>The post <a href="https://jharaphula.com/pure-css-tooltip/">Cross Browser pure CSS ToolTip using after and before Pseudo-elements</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="185" src="https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip-300x185.png" class="webfeedsFeaturedVisual wp-post-image" alt="Cross Browser pure CSS ToolTip using after and before Pseudo-elements" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" srcset="https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip-300x185.png 300w, https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip.png 750w" sizes="(max-width: 300px) 100vw, 300px" /><p>There are several ways to design ToolTip. You can design a tooltip using JavaScript or JQuery or CSS or BootStrap. Compare to Client Script ToolTip pure CSS based tooltip renders better performance. In the below demo I created a ToolTip using pure CSS classes. This is Cross Browser friendly and easy to customize.</p>
<p>“addtooltip” class represents styles for HTML page and mouse over area. Class Tooltip is responsible for the look and feel of ToolTip popup div. Using tooptip:before maintaining mouse cursor type during mouse movement from link to tooltip window. Similarly, using tooltip:after <a href="https://jharaphula.com/tricks-draw-css-triangle-div/" target="_blank" rel="noopener noreferrer">drawing Triangle</a> to the bottom of tooltip rectangle.</p>
<h2>Introduction to Tooltips</h2>
<p>Tooltips are small, contextual pop-up boxes that provide additional information when a user hovers over or focuses on an element. They enhance user experience by offering concise explanations, definitions, or supplementary details without cluttering the interface. Traditionally, tooltips were implemented using JavaScript, but modern CSS techniques allow for pure CSS-based solutions that are lightweight and performant.</p>
<h2>Why Use Pure CSS Tooltips?</h2>
<p>Pure CSS tooltips eliminate the need for JavaScript, reducing page load time and improving performance. They are simpler to implement, easier to maintain, and work seamlessly across different browsers when properly structured. Additionally, CSS tooltips degrade gracefully on browsers that do not support advanced CSS features.</p>
<h2>Basic Structure of a CSS Tooltip</h2>
<p>A pure CSS tooltip consists of two main components: 1. Trigger Element: The element (e.g., button, link, or icon) that activates the tooltip on hover or focus. 2. Tooltip Content: The hidden text or element that becomes visible when the trigger is activated.</p>
<p>In HTML I am with 2 div’s. First Div is addtooltip which contains tooltip div as a child. This Tooltip is based on pure CSS to run this you don’t required any plugin like JQuery or AngularJS.</p>
<h3>Example.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head runat=&quot;server&quot;&gt;
&lt;title&gt;ToolTip using pure CSS&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; src=&quot;toolTip.css&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;
&lt;div class=&quot;addtooltip&quot;&gt;
This is a Demo ToopTip.
&lt;div class=&quot;tooltip&quot;&gt;I am a tooltip!&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>toolTip.css</h3>
<pre class="brush: css; title: ; notranslate">.addtooltip {
background: #ddd;
cursor: pointer; /* Cursor icon to Hand Symbol */
font-size: 30px;
padding: 15px 20px;
margin: 100px 75px 10px 100px;
position: relative;
text-align: center;
width: 210px;
-webkit-transform: translateZ(0); /* Google Chrome Flicker Fix */
-webkit-font-smoothing: antialiased; /* Google Chrome Text Rendering Fix */
}

.addtooltip .tooltip {
background: #9ed3f3; /* Background Color of ToolTip rectangle */
bottom: 100%;
color: #0000FF; /* ToolTip Text Color */
display: block;
left: -25px;
opacity: 0;
padding: 20px;
pointer-events: none;
position: absolute;
width: 100%;
margin-bottom: 15px;
transition: all .25s ease-out;
-webkit-transition: all .25s ease-out; /* Fixing Transition issue in Google Chrome */
-moz-transition: all .25s ease-out; /* Fixing Transition issue in FireFox */
-ms-transition: all .25s ease-out; /* Fixing Transition issue in Safari */
-o-transition: all .25s ease-out; /* Fixing Transition issue in Opera */
transform: translateY(10px);
-webkit-transform: translateY(10px); /* Fixing Transform issue in Google Chrome */
-moz-transform: translateY(10px); /* Fixing Transform issue in FireFox */
-ms-transform: translateY(10px); /* Fixing Transform issue in Safari */
-o-transform: translateY(10px); /* Fixing Transform issue in Opera */
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); /* Fixing box-shadow issue in Google Chrome */
-moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); /* Fixing box-shadow issue in FireFox */
-ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); /* Fixing box-shadow issue in Safari */
-o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); /* Fixing box-shadow issue in Opera */
}

/* While moving your Mouse Cursor to ToolTip this will keep Continuity */
.addtooltip .tooltip:before {
bottom: -20px;
content: &quot; &quot;;
display: block;
height: 20px;
left: 0;
position: absolute;
width: 100%;
}

/* CSS Triangles below ToolTip Rectangle */
.addtooltip .tooltip:after {
border-left: solid transparent 12px;
border-right: solid transparent 12px;
border-top: solid #9ed3f3 12px;
bottom: -12px;
content: &quot; &quot;;
height: 0;
left: 50%;
margin-left: -13px;
position: absolute;
width: 0;
}

.addtooltip:hover .tooltip {
opacity: 1;
pointer-events: auto;
transform: translateY(0px);
-webkit-transform: translateY(0px); /* Fixing Transform issue in Google Chrome */
-moz-transform: translateY(0px); /* Fixing Transform issue in FireFox */
-ms-transform: translateY(0px); /* Fixing Transform issue in Safari */
-o-transform: translateY(0px); /* Fixing Transform issue in Opera */
}</pre>
<h2>Common Pitfalls and Solutions</h2>
<p>1. Z-Index Issues: Ensure tooltips appear above other elements by setting a high `z-index`.<br />
2. Responsiveness: Use relative units (e.g., `em`, `rem`) for tooltip sizing.<br />
3. Touch Devices: Provide fallbacks for devices without hover support (e.g., tap-to-reveal).</p>
<h2>Advanced Techniques</h2>
<p>1. Custom Shapes: Use `::before` and `::after` pseudo-elements for arrows or unique designs.<br />
2. Dynamic Content: Combine with CSS variables for reusable tooltip styles.<br />
3. Dark/Light Mode: Adapt tooltip colors using `prefers-color-scheme`.</p>
<h2>Conclusion</h2>
<p>Pure CSS tooltips are a lightweight, efficient way to enhance user interaction without relying on JavaScript. By leveraging CSS positioning, transitions, and accessibility best practices, developers can create responsive, cross-browser tooltips that improve usability across all devices. With careful attention to design and compatibility, these tooltips provide a seamless experience for users while maintaining clean, maintainable code.</p>
<p>The post <a href="https://jharaphula.com/pure-css-tooltip/">Cross Browser pure CSS ToolTip using after and before Pseudo-elements</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/pure-css-tooltip/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2017/01/pure-css-tooltip.png" medium="image" />
	</item>
		<item>
		<title>Easily Customizable Simple pure CSS3 Treeview Example</title>
		<link>https://jharaphula.com/simple-pure-css-treeview-example/</link>
					<comments>https://jharaphula.com/simple-pure-css-treeview-example/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Tue, 12 Jul 2016 16:37:16 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[AngularJS Treeview Example]]></category>
		<category><![CDATA[CSS3 New Features]]></category>
		<category><![CDATA[menu using pure CSS]]></category>
		<category><![CDATA[Pure CSS Treeview Example]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=4198</guid>

					<description><![CDATA[<img width="300" height="168" src="https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview-300x168.png" class="webfeedsFeaturedVisual wp-post-image" alt="Easily Customizable Simple pure CSS Treeview Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview-300x168.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview.png 742w" sizes="(max-width: 300px) 100vw, 300px" /><p>Generally to display hierarchy of Data we use a Treeview Control. The major advantages of a Treeview control is it loads data partially as per...</p>
<p>The post <a href="https://jharaphula.com/simple-pure-css-treeview-example/">Easily Customizable Simple pure CSS3 Treeview Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="168" src="https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview-300x168.png" class="webfeedsFeaturedVisual wp-post-image" alt="Easily Customizable Simple pure CSS Treeview Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview-300x168.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview.png 742w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Generally to display hierarchy of Data we use a Treeview Control. The major advantages of a Treeview control is it loads data partially as per the event triggered. I mean if you have bulk data to display, Treeview is the best option. While loading data depending upon the user click you can expand the specific node with data. From my experience I can say Compare to Script based Treeview pure CSS Treeview performs faster during operation.</p>
<p>In this demo app I Created a expandable and collapsible Treeview using pure CSS and HTML5. It&#8217;s simple and can easily Customizable according to your project requirement. To develop this Treeview in my <a href="https://jharaphula.com/list-of-html5-new-tags/" target="_blank" rel="noopener noreferrer">HTML</a> page I am using Order list (OL). Where each li contains nodes as File or Folder. Refer my CSS structure here li presents a Folder. If a li is with the CSS Class &#8220;each-node&#8221; then it re-presents File. To achieve Sub nodes I am using ol element under Folder li.</p>
<p>In CSS for each node I am checking the file extension and showing &#8220;page.png&#8221; image. If required you can update this to specific image Files. To handle the toggle operation I am applying checked attribute over each checkbox. To prevent Checkboxes from user view I am hiding them using &#8220;display: none&#8221;. Using the Tree view you can create upto n number of nodes with any depth.</p>
<h2>Pure CSS3 Customizable Treeview Example</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;charset=utf-8&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;main.css&quot; /&gt;
&lt;title&gt;Simple pure CSS Treeview Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;!-- Ordered list For Treeview --&gt;
&lt;ol class=&quot;tree-demo&quot;&gt;
&lt;li&gt;
&lt;label for=&quot;rootFolder&quot;&gt;SEO&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;rootFolder&quot; /&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;label for=&quot;onpageFolder&quot;&gt;On-page SEO&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;onpageFolder&quot; /&gt;
&lt;ol&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Title Optimization&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Keywords Optimization&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Meta Tag Optimization&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;label for=&quot;offpageFolder&quot;&gt;Off-page SEO&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;offpageFolder&quot; /&gt;
&lt;ol&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link Building&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Social Media Marketing&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Forum Posting&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Email Marketing&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Others&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Web Design&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Graphics Designing&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;DevOps&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Digital Marketing&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Pay Per Click program&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;each-node&quot;&gt;&lt;a href=&quot;#&quot;&gt;Domain Registration&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>main.css</h2>
<p>Using this CSS3 Treeview you can use specific icons with your nodes for File. Here in the below sample code I am checking for 4 kinds of Files pdf, html, css and js. In style here I am using Verdana, Helvetica fonts for my treeview. To make the toggle function live in this demo app I am using 2 images Toggle-Expand.png and Toggle-Collapse.png. For demo purpose you can download these images from here.</p>
<pre class="brush: css; title: ; notranslate">body, li { background: #424242; color: #FFF; margin: 0; padding: 0; font-family: Verdana, Helvetica; }
img { border: none; }

/* CSS Treeview Styles */
ol.tree-demo { padding: 0 0 0 30px; width: 300px; }
li { position: relative; margin-left: -15px; list-style: none; }
li.each-node { margin-left: -1px !important; }
li.each-node a { background: url(page.png) 0 0 no-repeat; display: block; padding-left: 21px; color: #fff; text-decoration: none; }

/* Checking document type to Show page icon */
li.each-node a[href *= '.pdf']	{ background: url(page.png) 0 0 no-repeat; }
li.each-node a[href *= '.html']	{ background: url(page.png) 0 0 no-repeat; }
li.each-node a[href $= '.css']	{ background: url(page.png) 0 0 no-repeat; }
li.each-node a[href $= '.js']	{ background: url(page.png) 0 0 no-repeat; }

li input { position: absolute; left: 0; opacity: 0; margin-left: 0; cursor: pointer; z-index: 2; width: 1em; height: 1em; top: 0; }
li input + ol { background: url(Toggle-Expand.png) 40px 0 no-repeat; height: 1em; margin: -0.938em 0 0 -44px; }
li input + ol &gt; li { display: none; margin-left: -14px !important; padding-left: 1px; }
li label { background: rgba(0, 0, 0, 0) url(&quot;Folder-Symbol.png&quot;) no-repeat scroll 12px 3px; padding-left: 36px; cursor: pointer; display: block; }
li input:checked + ol { background: rgba(0, 0, 0, 0) url(&quot;Toggle-Collapse.png&quot;) no-repeat scroll 40px 5px; height: auto; margin: -1.25em 0 0 -44px; padding: 1.563em 0 0 80px; }
li input + ol { position: relative; top: -3px; }
li input:checked + ol &gt; li { display: block; margin: 0 0 0.125em; }
li input:checked + ol &gt; li:last-child { margin: 0 0 0.063em; }</pre>
<p>In the above CSS Codes I used 1 CSS pseudo-class :last-child.</p>
<h2>Required images for Simple Treeview</h2>
<p>Here for demo purpose I created the below 4 images. You can use these images in any treeview control.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4206" src="https://jharaphula.com/wp-content/uploads/2016/07/Folder-Symbol.png" alt="Folder-Symbol" width="16" height="16" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4207" src="https://jharaphula.com/wp-content/uploads/2016/07/page.png" alt="page" width="16" height="16" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4208" src="https://jharaphula.com/wp-content/uploads/2016/07/Toggle-Collapse.png" alt="Toggle-Collapse" width="16" height="16" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4209" src="https://jharaphula.com/wp-content/uploads/2016/07/Toggle-Expand.png" alt="Toggle-Expand" width="16" height="16" /></p>
<p>The post <a href="https://jharaphula.com/simple-pure-css-treeview-example/">Easily Customizable Simple pure CSS3 Treeview Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/simple-pure-css-treeview-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/07/Pure-CSS-Treeview.png" medium="image" />
	</item>
		<item>
		<title>Easily Customizable pure CSS Tab view Control Example</title>
		<link>https://jharaphula.com/pure-css-tab-control-example/</link>
					<comments>https://jharaphula.com/pure-css-tab-control-example/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Mon, 11 Jul 2016 18:01:18 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Customizable pure CSS Tab]]></category>
		<category><![CDATA[Dynamic Tabs using BootStrap]]></category>
		<category><![CDATA[menu using pure CSS]]></category>
		<category><![CDATA[Pure CSS Treeview Example]]></category>
		<category><![CDATA[Tab view Control Example]]></category>
		<guid isPermaLink="false">http://jharaphula.com/?p=4187</guid>

					<description><![CDATA[<img width="300" height="160" src="https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs-300x160.png" class="webfeedsFeaturedVisual wp-post-image" alt="Easily Customizable pure CSS tab Control Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs-300x160.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs-604x320.png 604w, https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs.png 804w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display multiple panels in a specific area generally we prefer to use tab view. Tab view is a user friendly Control. The major advantages...</p>
<p>The post <a href="https://jharaphula.com/pure-css-tab-control-example/">Easily Customizable pure CSS Tab view Control Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="160" src="https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs-300x160.png" class="webfeedsFeaturedVisual wp-post-image" alt="Easily Customizable pure CSS tab Control Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs-300x160.png 300w, https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs-604x320.png 604w, https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs.png 804w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>To display multiple panels in a specific area generally we prefer to use tab view. Tab view is a user friendly Control. The major advantages of Tab view Control is it loads once during page load. Once the tab view appeared in a HTML page then during navigation it doesn&#8217;t required page refresh. I noticed in many web developers are using Script based tab Control. But Compare to Script based tab Control pure CSS tab view Control <a href="https://jharaphula.com/best-wordpress-plugins-optimize-pagespeed/" target="_blank" rel="noopener noreferrer">gives better performance</a>. The cause in this demo app I created an easily customizable pure CSS tabs for you.</p>
<p>The logic I implemented here is so simple. In my HTML page I have one UL element which contains 6 li elements. The First li element is with Tab links in the shape of HTML label controls. Which internally linked through id to respective radio buttons. Here I used radio type input box to take benefits of Single selection. I mean while tab 1 is active other tabs required to stay disabled. After First child of UL element rest li&#8217;s are with a radio button and div. Div&#8217;s are responsible to hold panel contents. As per your requirement here you can add n number of tabs. To run this demo app simply copy the following files to the root directory and open index.html.</p>
<h3>index.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Pure CSS tab Control Example&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;main.css&quot;/&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;Example to Create your Own CSS Tabs&lt;/h2&gt;
&lt;ul class=&quot;tabs-ctrl&quot;&gt;
&lt;li class=&quot;link-labels&quot;&gt;
&lt;label for=&quot;tab-rbtn-1&quot; id=&quot;tab-label-1&quot;&gt;Link 1&lt;/label&gt;
&lt;label for=&quot;tab-rbtn-2&quot; id=&quot;tab-label-2&quot;&gt;Link 2&lt;/label&gt;
&lt;label for=&quot;tab-rbtn-3&quot; id=&quot;tab-label-3&quot;&gt;Link 3&lt;/label&gt;
&lt;label for=&quot;tab-rbtn-4&quot; id=&quot;tab-label-4&quot;&gt;Link 4&lt;/label&gt;
&lt;label for=&quot;tab-rbtn-5&quot; id=&quot;tab-label-5&quot;&gt;Link 5&lt;/label&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;input type=&quot;radio&quot; checked name=&quot;tabs&quot; id=&quot;tab-rbtn-1&quot;&gt;
&lt;div id=&quot;tab-inner-1&quot; class=&quot;tab-inner&quot;&gt;
&lt;h2&gt;Link 1&lt;/h2&gt;
After the Success of his other books, Sanjeev Kapoor continues to enter the hearts of food lovers through their Stomachs.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;input type=&quot;radio&quot; name=&quot;tabs&quot; id=&quot;tab-rbtn-2&quot;&gt;
&lt;div id=&quot;tab-inner-2&quot; class=&quot;tab-inner&quot;&gt;
&lt;h2&gt;Link 2&lt;/h2&gt;
In this book he hands us the key to a delicious khazana of Indian cuisines. It offers several recipes that have been chosen from a vast repertoire of delicacies in Indian cooking. Called Khana Khazana: Celebration of Indian cookery, this book, now in its seventh edition, has been designed to familiarize food lovers with a long forgotten cuisine. 
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;input type=&quot;radio&quot; name=&quot;tabs&quot; id=&quot;tab-rbtn-3&quot;&gt;  
&lt;div id=&quot;tab-inner-3&quot; class=&quot;tab-inner&quot;&gt;
&lt;h2&gt;Link 3&lt;/h2&gt;
Indian cuisine is getting popularity all over the world and is available in the most parts of the globe but it is restricted to a select few dishes. There is an enormous range that remains unexplored. Each of the state and each region has its own cuisine and local flavor. In this book, we are introduced to a variety of dishes that have been perfected by our ancestors.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;input type=&quot;radio&quot; name=&quot;tabs&quot; id=&quot;tab-rbtn-4&quot;&gt;  
&lt;div id=&quot;tab-inner-4&quot; class=&quot;tab-inner&quot;&gt;
&lt;h2&gt;Link 4&lt;/h2&gt;
Here is an array of vegetarian, non-vegetarian recipes from Bengal, Maharashtra, Gujarat, the north of India, the southern states, which come with that special touch of the master chef. Macher jhol, bhajanee thalipeeth, Andhra Chilli Chicken, Kolambi bhaat, dhaabay di dal, rayalseema pesarettu, dhokar dalna, modak... the mouth watering list is endless.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;input type=&quot;radio&quot; name=&quot;tabs&quot; id=&quot;tab-rbtn-5&quot;&gt;  
&lt;div id=&quot;tab-inner-5&quot; class=&quot;tab-inner&quot;&gt;
&lt;h2&gt;Link 5&lt;/h2&gt;
All you need to do to bring the diversity of India into your home, is to start in your own kitchen and share the passion that Indian food is the best!
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>main.css</h3>
<pre class="brush: css; title: ; notranslate">body { background: #BDBDBD none repeat scroll 0 0; line-height: 28px; font-family: Helvetica; font-size: 16px; word-wrap: break-word !important; }

h1 { color: #FFF; font-size: 30px; margin-top: 90px; line-height: 1.5; text-align: center; }
h2 { margin: 0 0 8px 0 }

.tabs-ctrl { list-style: outside none none; margin: 0 auto; padding: 0; width: 700px; }
.tabs-ctrl li { display: block; }
.tabs-ctrl label { background: #5F4C0B none repeat scroll 0 0; border-radius: 6px 6px 0 0; color: #FFF; cursor: pointer; display: inline-block; float: left; font-size: 16px; font-weight: normal; margin-right: 3px; padding: 4px 20px; }
.tabs-ctrl label:hover { background: #3498db; }
.tab-inner { background-color: #FFF; display: none; line-height: 22px; padding: 15px; width: 100%; }
.tabs-ctrl input[type=radio] { display:none; }

.link-labels:after { content: ''; clear: both; display: table; }

[id^=tab-rbtn-]:checked ~ div[id^=tab-inner-] { display: block; }
[id^=tab-rbtn-]:checked ~ [id^=tab-label-] { background: #08C; color: white; }</pre>
<p>The post <a href="https://jharaphula.com/pure-css-tab-control-example/">Easily Customizable pure CSS Tab view Control Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/pure-css-tab-control-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/07/Easily-Customizable-CSS-Tabs.png" medium="image" />
	</item>
		<item>
		<title>How to install SASS on Windows? &#8211; SASS Getting Started</title>
		<link>https://jharaphula.com/sass-getting-started-install-windows/</link>
					<comments>https://jharaphula.com/sass-getting-started-install-windows/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 17:58:42 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced Features of SASS]]></category>
		<category><![CDATA[SASS Getting Started]]></category>
		<category><![CDATA[SASS on Windows]]></category>
		<category><![CDATA[SASS Variables]]></category>
		<category><![CDATA[Steps to install SASS]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1681</guid>

					<description><![CDATA[<img width="300" height="174" src="https://jharaphula.com/wp-content/uploads/2016/05/sass-installation-300x174.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to install SASS on Windows? - SASS Getting Started" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/sass-installation-300x174.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/sass-installation.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>As a UI Developer you must fetched few real-time problems while working in CSS. For an example how it is if we will declare a...</p>
<p>The post <a href="https://jharaphula.com/sass-getting-started-install-windows/">How to install SASS on Windows? &#8211; SASS Getting Started</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="174" src="https://jharaphula.com/wp-content/uploads/2016/05/sass-installation-300x174.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How to install SASS on Windows? - SASS Getting Started" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/sass-installation-300x174.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/sass-installation.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>As a UI Developer you must fetched few real-time problems while <a href="https://jharaphula.com/css3-new-features-gradients-webfonts/" rel="noopener noreferrer" target="_blank">working in CSS</a>. For an example how it is if we will declare a color variable and refer that in all classes with same color code. Such kind of problems we can fix using SASS. <a href="//sass-lang.com/" target="_blank" rel="nofollow noopener noreferrer">SASS</a> gives power to CSS. SASS is a feature rich powerful CSS extension language. SASS is compatible with all versions of CSS. We can structure our CSS using SASS.</p>
<p>The complete name of SASS is “Syntactically Awesome Stylesheets”. It was developed by Natalie Weizenbaum in 2006. Using SASS including default behaviors of CSS additionally we can do selector inheritance, nested rules, variables, inline imports &amp; mixins. SASS is available in 2 versions. The first version is SCSS (Sassy CSS). The extension of SCSS file is .scss.</p>
<h3>SASS Getting Started</h3>
<p><strong>Nesting</strong>: In Sass we can able to nest selectors in the same hierarchy as of HTML.</p>
<p><strong>Variables</strong>: Using Sass it can possible to store any CSS values to variables. Variable name begins with a dollar($) sign and assignment uses a colon (:). We can do arithmetic operations to variables also.</p>
<p><strong>Mixins</strong>: In SCSS using Mixins technique we can define styles &amp; the same styles can re-used throughout the stylesheet. To make more programmer friendly we can also pass arguments to Mixins.</p>
<p><strong>Inheritance</strong>: Using @extend selector in Sass we can inherit the styles from an another selector.</p>
<p><strong>Partials</strong>: To made modularization easy Sass introduced partial Sass files technique. A partial Sass file is named with a leading underscore, like _tempvariables.scss. This file is not converted to a CSS file. But we can import partial Sass files with the @import directive.</p>
<h3>How to install SASS on Windows?</h3>
<p>To install SASS in Windows first you required to download Ruby. You can download ruby from <a href="http://rubyinstaller.org" target="_blank" rel="noopener noreferrer nofollow">http://rubyinstaller.org</a>. Once you installed with ruby start the command prompt. From Command line to install Sass gem run the following Command:</p>
<p><em>gem install sass</em></p>
<p>SASS required one line Command to Setup. During installation if you found downloading issue, you can download the setup file manually from <a href="https://rubygems.org/gems/sass" target="_blank" rel="nofollow noopener noreferrer">https://rubygems.org/gems/sass</a>.<br />
To double check whether SASS installed successfully or not you can issue the following command.</p>
<p><em>sass -v</em></p>
<p>This will give you the version number of current installation like “Sass 3.4.22 (Selective Steve)”.<br />
SASS to CSS. Using the following command you can convert a SASS file to CSS.</p>
<p><em>sass input.scss output.css</em></p>
<p>SASS compiler can watch the changes in the SASS file and update the CSS using the following Command:</p>
<p><em>sass –watch input.scss:output.css</em></p>
<p>The post <a href="https://jharaphula.com/sass-getting-started-install-windows/">How to install SASS on Windows? &#8211; SASS Getting Started</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/sass-getting-started-install-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/sass-installation.jpg" medium="image" />
	</item>
		<item>
		<title>Easily Customizable Responsive Pure CSS Accordion Example</title>
		<link>https://jharaphula.com/responsive-pure-css-accordion-example/</link>
					<comments>https://jharaphula.com/responsive-pure-css-accordion-example/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 17:57:32 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Bootstrap Accordion]]></category>
		<category><![CDATA[CSS in UI designing]]></category>
		<category><![CDATA[Example of Simple Accordion]]></category>
		<category><![CDATA[Pure CSS Accordion Example]]></category>
		<category><![CDATA[Responsive CSS Accordion]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1679</guid>

					<description><![CDATA[<img width="300" height="176" src="https://jharaphula.com/wp-content/uploads/2016/05/css-accordion-300x176.png" class="webfeedsFeaturedVisual wp-post-image" alt="Easily Customizable Responsive Pure CSS Accordion Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-accordion-300x176.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-accordion.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>While displaying a Single panel using expand and collapse effects from the list of panels we generally prefer to use Accordion. In a web application...</p>
<p>The post <a href="https://jharaphula.com/responsive-pure-css-accordion-example/">Easily Customizable Responsive Pure CSS Accordion Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="176" src="https://jharaphula.com/wp-content/uploads/2016/05/css-accordion-300x176.png" class="webfeedsFeaturedVisual wp-post-image" alt="Easily Customizable Responsive Pure CSS Accordion Example" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-accordion-300x176.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-accordion.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>While displaying a Single panel using expand and collapse effects from the list of panels we generally prefer to use Accordion. In a web application Accordion helps to display large number of contents in less area. There are many ways to create an Accordion. I noticed many developers uses <a href="https://jharaphula.com/learn-javascript-programming-beginners/" target="_blank" rel="noopener noreferrer">scripting languages</a> to design an accordion. I can say this is a bad practice. Whether Server resource or Client resource we prefer to use as less as possible. The advantages of Pure CSS Accordion is it takes less time to load and easily Configurable.</p>
<p><img loading="lazy" decoding="async" src="https://jharaphula.com/wp-content/uploads/2016/05/pure-css-accordion.jpg" alt="pure-css-accordion" width="750" height="280" class="alignnone size-full wp-image-1794" srcset="https://jharaphula.com/wp-content/uploads/2016/05/pure-css-accordion.jpg 750w, https://jharaphula.com/wp-content/uploads/2016/05/pure-css-accordion-300x112.jpg 300w" sizes="auto, (max-width: 750px) 100vw, 750px" /></p>
<p>Here in this demo app I am using pure CSS with HTML5 to prepare a Easily Customizable Responsive Accordion. This is completely responsive and cross-browser compatible. You can use this by simply coping the below files.</p>
<h3>Pure-CSS-Accordion.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
&lt;title&gt;Pure CSS Accordion Example&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;master.css&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;basePanel&quot;&gt;
&lt;div class=&quot;accordion&quot;&gt;
&lt;div id=&quot;panel-1&quot;&gt;
&lt;a href=&quot;#panel-1&quot; class=&quot;panel&quot;&gt;NETWORK LAYER&lt;/a&gt;
&lt;div class=&quot;expandable&quot;&gt;
Network layer forms the third layer from top in the TCP/IP model. It does the functionality of transferring packets between networks. Internet protocol (IP) is an example of network layer protocol. IP performs the basic task of sending packets of data from source to target.
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;panel-2&quot;&gt;
&lt;a href=&quot;#panel-2&quot; class=&quot;panel&quot;&gt;DATA LINK LAYER&lt;/a&gt;
&lt;div class=&quot;expandable&quot;&gt;
The data link layer is the second layer. This layer has the functionality of adding the header information to the packet and also to transfer packets to the physical layer. The layer where packets are intercepted and sent over a virtual private network.
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;panel-3&quot;&gt;
&lt;a href=&quot;#panel-3&quot; class=&quot;panel&quot;&gt;PHYSICAL LAYER&lt;/a&gt;
&lt;div class=&quot;expandable&quot;&gt;
The first layer in TCP/IP model is Physical layer. It is accountable for encoding and spread of data through network communications media. It sends the data in the form of bits from the Physical layer of the source device and is received at the destination device. It also contains many hardware-related network design issues. For example, LAN, WAN and wireless technology.
&lt;/div&gt;			
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>master.css</h3>
<pre class="brush: css; title: ; notranslate">.accordion { width: 100%; }
.accordion .panel { display: block; height: 35px; padding-left: 20px; font: bold 14px/35px Arial, Verdana; text-decoration: none; color: #eee; background: #66BECA; }
.accordion .panel:hover,.accordion div:target .panel { color: #2b3b06; }
.accordion div .expandable { display: none; margin: 8px 5px 5px 20px; font-family: Arial, Verdana; font-size: 15px; }
.accordion div:target .expandable { display: block; }
.accordion &amp;gt; div { height: 40px; overflow: hidden; -webkit-transition: all .3s ease-in-out; -moz-transition: all .3s ease-in-out; -o-transition: all .3s ease-in-out; -ms-transition: all .3s ease-in-out; transition: all .3s ease-in-out; }
.accordion &amp;gt; div:target { height: 200px; background: #E3E6E6; margin-bottom: 5px; }</pre>
<p>The post <a href="https://jharaphula.com/responsive-pure-css-accordion-example/">Easily Customizable Responsive Pure CSS Accordion Example</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/responsive-pure-css-accordion-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css-accordion.png" medium="image" />
	</item>
		<item>
		<title>CSS Best Practices &#038; Style Guide for Web Designers</title>
		<link>https://jharaphula.com/css-best-practices-style-guide/</link>
					<comments>https://jharaphula.com/css-best-practices-style-guide/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 17:13:24 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[basics of Web Design]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CSS Best Practices]]></category>
		<category><![CDATA[CSS Syntax]]></category>
		<category><![CDATA[Style Guide for Web]]></category>
		<category><![CDATA[Web Design best practices]]></category>
		<category><![CDATA[Web Designers]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1646</guid>

					<description><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-300x194.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS Best Practices &amp; Style Guide for Web Designers" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-300x194.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Designing a Software is not a Single handed job. Multiple resources required to build an application. Let&#8217;s assume in your lab 10 resources are working...</p>
<p>The post <a href="https://jharaphula.com/css-best-practices-style-guide/">CSS Best Practices &#038; Style Guide for Web Designers</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-300x194.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS Best Practices &amp; Style Guide for Web Designers" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-300x194.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Designing a Software is not a Single handed job. Multiple resources required to build an application. Let’s assume in your lab 10 resources are working as a Team. Here if your Style Guide is different from others then practically it takes time for other developers to understood or update your Codes. Unplanned Coding Standard waste quality time of a Developer. It is advisable to maintain similar CSS Style Guide during you generate CSS Styles. In this session let us share few <a href="https://jharaphula.com/css3-new-features-gradients-webfonts/" rel="noopener noreferrer" target="_blank">CSS</a> best practices to improve your Coding Standard. </p>
<p>To decorate a HTML page CSS is the Structural approach. Generally we use CSS for creating visually engaging websites or user interfaces of a web applications/mobile applications. Initially CSS was introduced by &#8220;Hakon Wium Lie&#8221; &amp; &#8220;Bert Bos&#8221; in the year of 1996. This technology is approved by W3C (<em>World Wide Web Consortium</em>). The main objective behind the innovation of CSS is to separate HTML &amp; Styles. CSS helps to customize user interface centrally.</p>
<h3>CSS Best Practices</h3>
<p><strong>1</strong>. If multiple HTML elements required same style but their CSS Class names are different use grouping. When grouping selectors for each class choose new line. For an example:</p>
<pre class="brush: css; title: ; notranslate">/* Bad CSS practice */
.tabView, .tabView-prev, .tabView-next, .tabView [type=text] {
background-color: #FF0000;
padding: 20px;
margin: 10px 10px 12px;
}

/* Good CSS practice */
.tabView,
.tabView-prev, 
.tabView-next, 
.tabView [type=text] {
background-color: #FF0000;
padding: 20px;
margin: 10px 10px 12px;
}</pre>
<p><strong>2</strong>. While declare value to an attribute include a space after colon (:). For an example in place of margin:10px; it is a good practice to use margin: 10px;.</p>
<p><strong>3</strong>. Practice to add semi-colon (;) at the end of each property and value pairs. For an example padding: 20px;.</p>
<p><strong>4</strong>. While defining a class name or id choose lowercase letters with meaning full words. If your class name is more than one word for separation in between each words use hyphen (-). For an example to define a tab sub-menu class you can use &#8220;tab-submenu&#8221;.</p>
<p><strong>5</strong>. While declaring hsl(), rect(), rgba() or rgb() never include space in between comma separated values. For an example while declaring rgb() use rgb(0,10,0,.5) in place of rgb(0, 10, 0, .5). This practice helps to differentiate multiple color values (comma with no space) from multiple property values (comma including space).</p>
<p><strong>6</strong>. In place of color parameters or property values while defining a floating point value avoid 0 as the prefix. For an example in place of 0.5px use .5px.</p>
<p><strong>7</strong>. Specially while using hexadecimal codes use lowercase letters with shorthand expressions. For an example use color: #fff; in place of color: #FFFFFF;.</p>
<p><strong>8</strong>. While creating a selector with attribute &amp; value pair use double quote to define value. For an example input[type=&#8221;text&#8221;].</p>
<p><strong>9</strong>. While specifying 0 value for a property avoid unit notation. For an example replace margin: 0px; with margin: 0;.</p>
<p><strong>10</strong>. Inside a CSS Class while declaring multiple properties maintain sequence as Position, Box Model, Typographic and Visual.</p>
<pre class="brush: css; title: ; notranslate">.tab-submenu {
/* Positioning Properties */
position: relative;
top: 10px;

/* Box-model Properties */
display: block;
margin: 10px 10px 12px 0;

/* Typography Properties */
font: normal 13px &quot;Verdana&quot;, sans-serif;

/* Visual Properties */
background-color: #f6f6f6; 
}</pre>
<p><strong>11</strong>. While embedding external CSS files to your HTML page avoid @import. Compare to &lt;link&gt; @improt takes more time to load.</p>
<pre class="brush: css; title: ; notranslate">&lt;!-- Use link elements to embed --&gt;
&lt;link rel=&quot;stylesheet&quot; src=&quot;tab.css&quot; /&gt;

&lt;!-- Avoid @imports --&gt;
@import url(&quot;tab.css&quot;);</pre>
<p><strong>12</strong>. Common overused shorthand properties are padding, margin, font, background, border &amp; border-radius. Strive to limit use of shorthand expressions to instances where you must explicitly set all the available values.</p>
<p><strong>13</strong>. While commenting a class ensure that your comment is descriptive and easy to approachable by others.</p>
<p><strong>14</strong>. While Creating a CSS file follow the structure approach as Global, Type, Forms, Header, Navigation, Content &amp; Footer in Sequence.</p>
<p>The post <a href="https://jharaphula.com/css-best-practices-style-guide/">CSS Best Practices &#038; Style Guide for Web Designers</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/css-best-practices-style-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css3-style-guide.jpg" medium="image" />
	</item>
		<item>
		<title>CSS3 Animation Examples using Keyframe and its Properties</title>
		<link>https://jharaphula.com/css3-animation-examples-properties/</link>
					<comments>https://jharaphula.com/css3-animation-examples-properties/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 07:26:10 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced CSS3]]></category>
		<category><![CDATA[CSS3 Animation]]></category>
		<category><![CDATA[CSS3 Animation Examples]]></category>
		<category><![CDATA[CSS3 Animations and Transitions]]></category>
		<category><![CDATA[Examples using keyframe]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1333</guid>

					<description><![CDATA[<img width="300" height="181" src="https://jharaphula.com/wp-content/uploads/2016/05/css3-animation-300x181.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS3 Animation Examples using keyframe &amp; Properties" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css3-animation-300x181.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css3-animation.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>As you know in the early age of web programming generally we generally do animation using JavaScript, Jquery or Flash. But these methods are having...</p>
<p>The post <a href="https://jharaphula.com/css3-animation-examples-properties/">CSS3 Animation Examples using Keyframe and its Properties</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="181" src="https://jharaphula.com/wp-content/uploads/2016/05/css3-animation-300x181.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS3 Animation Examples using keyframe &amp; Properties" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css3-animation-300x181.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css3-animation.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>As you know in the early age of web programming generally we generally do animation using JavaScript, Jquery or Flash. But these methods are having some limitation. Using JavaScript or Jquery it is required that Client machine need to allow Scripts to run. Similarly using Flash animations frames are not <a href="https://jharaphula.com/category/free-seo-training-tools/" target="_blank" rel="noopener noreferrer">SEO friendly</a>. These problems are addressed in CSS3 animation. Compare to JavaScript &amp; Flash animation CSS3 animation results better performance. To get started with CSS3 animation look at the below CSS3 Animation Examples.</p>
<h3>Examples.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;title&gt;CSS3 Animation Examples using Keyframe&lt;/title&gt;
&lt;head&gt;
&lt;style&gt;
div {
width: 200px;
height: 100px;
background-color: green;
-webkit-animation-name: animationDemo; /* for Google Chrome, Safari, Opera */
-webkit-animation-duration: 4s; /* for Google Chrome, Safari, Opera */
animation-name: animationDemo;
animation-duration: 4s;
}

/* Syntax for Chrome, Safari, Opera */
@-webkit-keyframes animationDemo {
from {background-color: green;}
to {background-color: red;}
}

/* Standard browser syntax */
@keyframes animationDemo {
from {background-color: green;}
to {background-color: red;}
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>In the above block of code I did a small animation using CSS3. I have a div in my HTML page. Initially it has its background color green. Later using CSS3 @keyframes I am updating background color to red. To apply @keyframe on my div I added the animation-name &#8220;animationDemo&#8221;. Then followed by @keyframes I am assigning From &amp; To properties of animationDemo class. In From block I declared the initial state as background color green. Then in To block I am updating background color to red. This example is for demo purpose. Using From &amp; To properties of @keyframes you can implement any kind of animation in CSS3.</p>
<h3>List of CSS3 Animation Properties</h3>
<p>To know more about CSS3 Animation here in below I am describing all its properties. Starting from Animation direction to Speed of animation these properties will help you.</p>
<table>
<tbody>
<tr>
<th>Properties</th>
<th>Description</th>
</tr>
<tr>
<td>@keyframes</td>
<td>@Keyframe comes with From &amp; To parts. To do an animation in this block we can specify the required CSS. From generally contains the default state. Where To contains the final state of animation.</td>
</tr>
<tr>
<td>animation</td>
<td>A shorthand property for setting all the animation properties.</td>
</tr>
<tr>
<td>animation-delay</td>
<td>Some time we required some interval to start animation. For an example after successful submission I want to show a green flag in my page. In this case using animation-delay property we can specifies the interval to start the animation. The default value for this property is 0.</td>
</tr>
<tr>
<td>animation-direction</td>
<td>Animation can occur in any direction. It can be top to bottom or left to right. In case you want reverse, I mean bottom to top or right to left this property helps. Using animation-direction property we can reverse direction or alternate cycles of an animation. Animation direction comes with the following properties normal, reverse, alternate, alternate-reverse, initial &amp; inherit. To know more about these properties you can refer animation-direction properties.</td>
</tr>
<tr>
<td>animation-duration</td>
<td>An animation can be a single cycle or can be repeated cycle. Using animation-duration you can defines how many seconds or milliseconds an animation takes to complete one cycle.</td>
</tr>
<tr>
<td>animation-fill-mode</td>
<td>In case some where you want to stop your animation in this case animation-fill-mode works. This property help to specify a specific style for the element when the animation is not playing.</td>
</tr>
<tr>
<td>animation-iteration-count</td>
<td>In case you want you animation need to repeat for certain number of time in this case you can use this property. Here if you specify the number of times an animation need to play, that animation will repeat this much time.</td>
</tr>
<tr>
<td>animation-name</td>
<td>Defines the name of animation. Which we use for @keyframes.</td>
</tr>
<tr>
<td>animation-play-state</td>
<td>Assume in your animation you want to provide pause button. I mean in between the animation you want to give a facility to the customer that he can pause the animation in any point of time. For this case animation-play-state property is useful. Using this property you can define whether the animation is running or paused.</td>
</tr>
<tr>
<td>animation-timing-function</td>
<td>Specifies the speed curve of the animation.</td>
</tr>
</tbody>
</table>
<p>The post <a href="https://jharaphula.com/css3-animation-examples-properties/">CSS3 Animation Examples using Keyframe and its Properties</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/css3-animation-examples-properties/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css3-animation.jpg" medium="image" />
	</item>
		<item>
		<title>Example of SASS Mixin, Variables, Partials, Inheritance &#038; Nesting</title>
		<link>https://jharaphula.com/example-of-sass-mixin-variables-partials-nesting/</link>
					<comments>https://jharaphula.com/example-of-sass-mixin-variables-partials-nesting/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 06:48:41 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced Features of SASS]]></category>
		<category><![CDATA[Example of SASS]]></category>
		<category><![CDATA[SASS Mixin]]></category>
		<category><![CDATA[SASS Nesting]]></category>
		<category><![CDATA[SASS Variables]]></category>
		<category><![CDATA[Steps to install SASS]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1311</guid>

					<description><![CDATA[<img width="300" height="192" src="https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows-300x192.png" class="webfeedsFeaturedVisual wp-post-image" alt="Example of SASS Mixin, Variables, Partials, Inheritance &amp; Nesting" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows-300x192.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Technology updates everyday. I am a UI developer, first time when I heard about SASS I started searching in Google to know &#8220;What is SASS?&#8221;....</p>
<p>The post <a href="https://jharaphula.com/example-of-sass-mixin-variables-partials-nesting/">Example of SASS Mixin, Variables, Partials, Inheritance &#038; Nesting</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="192" src="https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows-300x192.png" class="webfeedsFeaturedVisual wp-post-image" alt="Example of SASS Mixin, Variables, Partials, Inheritance &amp; Nesting" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows-300x192.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Technology updates everyday. I am a UI developer, first time when I heard about SASS I started searching in Google to know &#8220;What is SASS?&#8221;. Off course I am an expert in CSS but how SASS is different from CSS? What are the advanced feature SASS provides compare to CSS? When CSS is here why SASS is introduced? Like plenty of queries I have at the Starting. Then I explore few advanced features of SASS such as SASS Mixin, SASS Variables, SASS Partials or SASS Nesting. In below sharing all those experiences with Example of SASS features.</p>
<p>The full name of SASS is &#8220;<strong>Syntactically Awesome Stylesheets</strong>&#8220;. It is a <a href="https://jharaphula.com/css3-new-features-gradients-webfonts/" target="_blank" rel="noopener noreferrer">CSS</a> extension language in run-time which is compiled into CSS. Large style sheets can easily maintain by SASS. SCSS is one of two syntax&#8217;s of SASS which uses block formatting like CSS. The extension for SASS file is .scss.</p>
<h3>Steps to install SASS</h3>
<p>To Getting Started with SASS, we need to install it first. Installer version of SASS is SASS gem. In Windows Operating System to run SASS we required <a href="https://www.ruby-lang.org" target="_blank" rel="nofollow noopener noreferrer">Ruby</a> at a min.</p>
<p>From Command line to install Sass gem run the following Command:</p>
<p><em>gem install sass</em></p>
<p>During installation if you found downloading issue, you can download the setup file manually from <a href="https://rubygems.org/gems/sass" target="_blank" rel="noopener noreferrer nofollow">https://rubygems.org/gems/sass</a>.</p>
<p>To run SASS from command line:</p>
<p><em>sass input.scss output.css</em></p>
<p>Sass can watch the changes in the Sass file and update the CSS using the following Command:</p>
<p><em>sass &#8211;watch input.scss:output.css</em></p>
<h3>Advanced Features of SASS</h3>
<p>Sass has introduced the following advanced features:</p>
<ul>
<li>Nesting</li>
<li>Variables</li>
<li>Mixin</li>
<li>Inheritance</li>
<li>Partials</li>
</ul>
<h3>SASS Nesting</h3>
<p>Nesting improves readability by visually representing the HTML structure, reducing redundancy, and making it easier to manage complex styles. However, over-nesting can lead to overly specific selectors, so it should be used judiciously.</p>
<p>In SASS we can able to nest selectors in the same hierarchy as of HTML.</p>
<p><strong>Example of SASS Nesting</strong>:</p>
<table>
<tbody>
<tr>
<td>SCSS code</td>
<td>Output CSS</td>
</tr>
<tr>
<td>
<pre class="brush: css; title: ; notranslate">ul {
list-style: none;
li {
display: inline-block; 
a {
padding: 15px 20px;
}
}
}</pre>
</td>
<td>
<pre class="brush: css; title: ; notranslate">ul {
list-style: none; }
ul li {
display: inline-block; }
ul li a {
padding: 15px 20px; }</pre>
</td>
</tr>
</tbody>
</table>
<h3>SASS Variables</h3>
<p>Variables in SASS allow developers to store reusable values such as colors, fonts, and spacing, making stylesheets more maintainable. In CSS, variables were introduced later (CSS Custom Properties), but SASS has supported them for much longer with broader browser compatibility.</p>
<p>SASS variables are compiled into static values, making them more predictable in older browsers. They also support mathematical operations and can be scoped within selectors, providing greater flexibility.</p>
<p>Using SASS it can possible to store any CSS values to variables. Variable name begins with a dollar($) sign and assignment uses a colon (:). We can do arithmetic operations to variables also.</p>
<p><strong>Example of SASS Variables</strong>:</p>
<table>
<tbody>
<tr>
<td>SCSS code</td>
<td>Output CSS</td>
</tr>
<tr>
<td>
<pre class="brush: css; title: ; notranslate">/*Sass Variables*/
$font-normal: Arial, Verdana;
$primary-color: #DDDDDD;
/*Class*/
body {
font-family:  $font-normal;
background: $primary-color;
}</pre>
</td>
<td>
<pre class="brush: css; title: ; notranslate">body {
font-family:  Arial, Verdana;
background: #DDDDDD; }</pre>
</td>
</tr>
</tbody>
</table>
<h3>SASS Mixin</h3>
<p>In SASS using Mixin technique we can define styles &amp; the same styles can re-used throughout the stylesheet. To make more programmer friendly we can also pass arguments to Mixin.</p>
<p><strong>Example of SASS Mixin</strong>:</p>
<table>
<tbody>
<tr>
<td>SASS code</td>
<td>Output CSS</td>
</tr>
<tr>
<td>
<pre class="brush: css; title: ; notranslate">@mixin border-radius($value) {
-webkit-border-radius: $value;
-moz-border-radius: $value;
-ms-border-radius: $value;
border-radius: $value; }

.button { 
@include border-radius(12px); 
}</pre>
</td>
<td>
<pre class="brush: css; title: ; notranslate">.button {
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
-ms-border-radius: 12px;
border-radius: 12px; }</pre>
</td>
</tr>
</tbody>
</table>
<h3>SASS Inheritance</h3>
<p>SASS inheritance, using `@extend`, allows selectors to inherit styles from another, promoting DRY (Don’t Repeat Yourself) principles. Unlike CSS, where inheritance is limited to native cascading, SASS enables explicit style sharing.</p>
<p>Using @extend selector in SASS we can inherit the styles from an another selector.</p>
<p><strong>Example of SASS Inheritance</strong>:</p>
<table>
<tbody>
<tr>
<td>SASS code</td>
<td>Output CSS</td>
</tr>
<tr>
<td>
<pre class="brush: css; title: ; notranslate">.color-yellow {
color: #fc0;
}
.button {
@extend .color-yellow;
}</pre>
</td>
<td>
<pre class="brush: css; title: ; notranslate">.color-yellow, .button {
color: #fc0; }</pre>
</td>
</tr>
</tbody>
</table>
<h3>SASS Partials</h3>
<p>To made modularization easy SASS introduced partial SASS files technique. A partial SASS file is named with a leading underscore, like _tempvariables.scss. This file is not converted to a CSS file. But we can import partial SASS files with the @import directive.</p>
<p><strong>Example of SASS Partials</strong>:</p>
<pre class="brush: css; title: ; notranslate">@import &quot;tempvariables&quot;;
@import &quot;modules&quot;;</pre>
<h2>Conclusion</h2>
<p>SASS provides significant advantages over traditional CSS with features like nesting, variables, mixins, inheritance, and partials. These tools enhance code maintainability, reduce redundancy, and streamline development workflows. While CSS is essential for web styling, SASS’s advanced functionalities make it a powerful extension for modern developers. By leveraging these features, teams can write cleaner, more efficient, and scalable stylesheets.</p>
<p>The post <a href="https://jharaphula.com/example-of-sass-mixin-variables-partials-nesting/">Example of SASS Mixin, Variables, Partials, Inheritance &#038; Nesting</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/example-of-sass-mixin-variables-partials-nesting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/SASS-in-Windows.png" medium="image" />
	</item>
		<item>
		<title>CSS3 New Features (Gradients, Webfonts, Transitions, Shadow Effects&#8230;)</title>
		<link>https://jharaphula.com/css3-new-features-gradients-webfonts/</link>
					<comments>https://jharaphula.com/css3-new-features-gradients-webfonts/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sun, 15 May 2016 06:23:45 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced CSS3]]></category>
		<category><![CDATA[Calc() Function]]></category>
		<category><![CDATA[CSS3 Animations and Transitions]]></category>
		<category><![CDATA[CSS3 Media Queries]]></category>
		<category><![CDATA[CSS3 New Features]]></category>
		<category><![CDATA[Webfonts using CSS3]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1286</guid>

					<description><![CDATA[<img width="300" height="190" src="https://jharaphula.com/wp-content/uploads/2016/05/css3-coding-300x190.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS3 New Features (Gradients, Webfonts, Transitions, Shadow Effects...)" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css3-coding-300x190.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css3-coding.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In the world of Software Development more revisions means more features. What ever the Software you develop in the initial stage you need to prepare...</p>
<p>The post <a href="https://jharaphula.com/css3-new-features-gradients-webfonts/">CSS3 New Features (Gradients, Webfonts, Transitions, Shadow Effects&#8230;)</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="190" src="https://jharaphula.com/wp-content/uploads/2016/05/css3-coding-300x190.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS3 New Features (Gradients, Webfonts, Transitions, Shadow Effects...)" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css3-coding-300x190.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css3-coding.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>In the world of Software Development <strong>more revisions means more features</strong>. What ever the Software you develop in the initial stage you need to prepare the basic version. Later depending upon the Customers feedback you need to enhance your Software. The same story happened here, <strong>CSS3 is the third revision of Cascading Style Sheets</strong> (CSS). Initial version of Cascading Style Sheets (CSS V.1) was developed by Bert Bos, Hakon Wium Lie &amp; World Wide Web Consortium (W3C) &amp; released on 17th December 1996. Later further versions (CSS V.2 &amp; CSS V.2.1) released to stay update with market demand. CSS2 run over the market for several years. During this period it was observed that there are some areas where CSS2 can be update. These updates will save programmers time &amp; can help to improve performance in web designing. Let us discuss those CSS3 New Features.</p>
<h3>Calc() Function</h3>
<p>Calc() is a mathematical function. In CSS3 it is used to Calculate values. Let&#8217;s talk about a case where I want a div with width 100% but from right side of browser window I required a gap of 50 pixels. In this case using CSS2 you can do this by declaring div width to 100% &amp; additional you need to set margin for right side of the div. The same you can achieve in CSS3 without setting margin. Here calc() function helps. Look at the class below.</p>
<pre class="brush: css; title: ; notranslate">.myDiv {
/* Using Calc() function to Calculate the width */
width: calc(100% - 50px);
background-color: #DDD;
}</pre>
<h3>Gradients</h3>
<p>You may remember the early age of programming, where to achieve a Gradient horizontal bar we generally do create an image with 1px width &amp; Gradients background colors as we required. Then repeating that image as a background of the div. If any time we required to update the Gradients color, first we need to update that image. Do you don&#8217;t feel this is little bit time consuming job &amp; required more focus to maintain. That&#8217;s why CSS3 introduced a new feature Gradients. Using this you can easily create a Gradient background with a single line of code.</p>
<p>Generally CSS3 <strong>Gradients are 2 types Linear &amp; Radial Gradient</strong>. Linear Gradient by default is Top to Bottom. You can customize linear gradient in various ways. Look at the examples below.</p>
<p>Example of Linear Gradient from Top to Bottom (By Default):</p>
<pre class="brush: css; title: ; notranslate">.li-grad {
background: linear-gradient(#0A65D4, #98BAE2); /* Default One */
background: -webkit-linear-gradient(#0A65D4, #98BAE2); /* For Safari &amp;amp; Google Chrome */
background: -o-linear-gradient(#0A65D4, #98BAE2); /* For Opera */
background: -moz-linear-gradient(#0A65D4, #98BAE2); /* For Firefox */
}</pre>
<p>Example of Linear Gradient from Left to Right:</p>
<pre class="brush: css; title: ; notranslate">background: linear-gradient(left, #0A65D4, #98BAE2); /* Default One */
background: -webkit-linear-gradient(left, #0A65D4, #98BAE2); /* For Safari &amp;amp; Google Chrome */
background: -o-linear-gradient(left, #0A65D4, #98BAE2); /* For Opera */
background: -moz-linear-gradient(left, #0A65D4, #98BAE2); /* For Firefox */</pre>
<p>Example of Linear Gradient Diagonally:</p>
<pre class="brush: css; title: ; notranslate">background: linear-gradient(left top, #0A65D4, #98BAE2); /* Default One */
background: -webkit-linear-gradient(left top, #0A65D4, #98BAE2); /* For Safari &amp;amp; Google Chrome */
background: -o-linear-gradient(left top, #0A65D4, #98BAE2); /* For Opera */
background: -moz-linear-gradient(left top, #0A65D4, #98BAE2); /* For Firefox */</pre>
<p>OR</p>
<pre class="brush: css; title: ; notranslate">background: linear-gradient(bottom right, #0A65D4, #98BAE2); /* Default One */
background: -webkit-linear-gradient(bottom right, #0A65D4, #98BAE2); /* For Safari &amp;amp; Google Chrome */
background: -o-linear-gradient(bottom right, #0A65D4, #98BAE2); /* For Opera */
background: -moz-linear-gradient(bottom right, #0A65D4, #98BAE2); /* For Firefox */</pre>
<p>Example of Linear Gradient using Angles:</p>
<pre class="brush: css; title: ; notranslate">background: linear-gradient(180deg, #0A65D4, #98BAE2); /* Default One */
background: -webkit-linear-gradient(180deg, #0A65D4, #98BAE2); /* For Safari &amp;amp; Google Chrome */
background: -o-linear-gradient(180deg, #0A65D4, #98BAE2); /* For Opera */
background: -moz-linear-gradient(180deg, #0A65D4, #98BAE2); /* For Firefox */</pre>
<p>Example of Linear Gradient using Multi-Color:</p>
<pre class="brush: css; title: ; notranslate">background: linear-gradient(red, green, yellow, white, blue); /* Default One */
background: -webkit-linear-gradient(red, green, yellow, white, blue); /* For Safari &amp;amp; Google Chrome */
background: -o-linear-gradient(red, green, yellow, white, blue); /* For Opera */
background: -moz-linear-gradient(red, green, yellow, white, blue); /* For Firefox */</pre>
<p>Example of Radial Gradient:</p>
<pre class="brush: css; title: ; notranslate">.ra-grad {
background: radial-gradient(to bottom, #0A65D4, #98BAE2); /* Default One */
background: -webkit-radial-gradient(#0A65D4, #98BAE2); /* For Safari &amp;amp; Google Chrome */
background: -o-radial-gradient(#0A65D4, #98BAE2); /* For Opera */
background: -moz-radial-gradient(#0A65D4, #98BAE2); /* For Firefox */
}</pre>
<h3>Rounded Corners</h3>
<p>Followed by Customer Demand many times we required to implement round corner content area. You may recall those days when we use images to achieve this. This difficulty is addressed in CSS3. To round corner of a div you required only one CSS property border-radius. Look at the example below:</p>
<pre class="brush: css; title: ; notranslate">.myDiv {
border: 2px solid #000000;
border-radius: 15px; /* Default One */
-webkit-border-radius: 15px; /* For Safari &amp;amp; Google Chrome */
-o-border-radius: 15px; /* For Opera */
-moz-border-radius: 15px; /* For Firefox */
width: 100px;
}</pre>
<h3>Webfonts using CSS3</h3>
<p>Year back in web programming we have limited web-safe fonts. How this is if we have a central store from where we can add any kind of fonts to our application? The same thing CSS3 did. Using CSS3 web-fonts you can use fonts from On-line. Few popular font directories are <a href="https://jharaphula.com/how-to-add-font-awesome-icons-to-svg-based-d3-js-graphs/" target="_blank" rel="noopener noreferrer">Google Fonts</a> and <a href="https://typekit.com" target="_blank" rel="noopener noreferrer nofollow">typekit</a>. Integrating fonts using CSS3 webfonts is very easy. Morden web-fonts comes with vector graphics. On the way of better performance these icons helps a grate. It reduces http requests &amp; load time. Look at the examples below how to use CSS3 webfonts.</p>
<p>In HTML Head:</p>
<pre class="brush: xml; title: ; notranslate">&lt;link href=&quot;http://fonts.googleapis.com/css?family=Satisfy&quot; rel=&quot;stylesheet&quot; /&gt;
&lt;div class=&quot;webfonts&quot;&gt;This is the example of using webfonts in CSS3.&lt;/div&gt;</pre>
<p>CSS Class:</p>
<pre class="brush: css; title: ; notranslate">.webfonts {
font-family: Satisfy, cursive;
font-weight: normal;
font-size: 14px;
}</pre>
<h3>Border Images</h3>
<p>In the previous versions of CSS3 you can&#8217;t set image for border. Only border color you can define. It was found in many places programers required to add image around. To full fill this CSS3 introduced border-image property. Using this you can easily set border image. The only trick you need to follow is according to your image height you need to set border-width &amp; make border transparent. Look at the example below.</p>
<pre class="brush: css; title: ; notranslate">border:40px solid transparent;
border-image: url(img/decoration.png) 40 40 round;</pre>
<h3>CSS3 Media Queries</h3>
<p>Today there are several devices from where users are accessing web. To make a web page compatible for any resolution &amp; various devices CSS3 introduced Media Queries. Media Queries are the technique using which you can write CSS for any specific media. Let&#8217;s talk about a mobile device with resolution 320px. In this case to optimize your web page for this resolution you can use media queries. To know more about CSS3 Media Queries please refer our another release <a href="https://jharaphula.com/css3-media-queries-tutorial/" target="_blank" rel="noopener noreferrer">Introduction to CSS3 Media Queries</a>.</p>
<p>Example:</p>
<pre class="brush: css; title: ; notranslate">@media screen and (min-width: 768px) and (max-width: 1024px) {
/* Styles for Screen Resolution 768px to 1024px */
}

@media screen and (max-width: 600px) {
/* Styles for Screen Resolution up to 600px */
}</pre>
<h3>Advanced Selectors</h3>
<p>Selector is a key in CSS. Using Selector in CSS we do categories the HTML elements for specific Style. You must aware of various of selectors using CSS2. Still in the real-world of programming programmers found various scenarios where they required some additional selectors. That all is introduced in the latest revision of CSS. From the following examples you can track advanced CSS3 selectors.</p>
<p>Example:</p>
<pre class="brush: css; title: ; notranslate">/* CSS3 Selector to select first letter from span's: */
span::first-letter {
background-color: #DDD;
font-size: 14px;
font-style:normal;
color: #FF0000;
}</pre>
<pre class="brush: css; title: ; notranslate">/* CSS3 Selector to select first line from span's: */
span::first-line {
font-style: bold;
font-size: 16px;
font-family: Arial;
}</pre>
<pre class="brush: css; title: ; notranslate">/* CSS3 selector to select first and last elements */
.elem:first-child, .elem:last-child {
background-color:#DDDDDD;
}</pre>
<pre class="brush: css; title: ; notranslate">/* From nth elements how to set style for only odd elements */
.elem:nth-child(odd){
border-radius:30%;
}</pre>
<pre class="brush: css; title: ; notranslate">/* Target elements by attribute */
.elem[data-foo=bar1] {
background-color: #DDD;
}</pre>
<h3>CSS3 Animations &amp; Transitions</h3>
<p>Compare to Flash or JavaScript animation CSS3 animation render faster. Animation is a new feature introduced in CSS3. Performance wise CSS3 animations are more programmers friendly. In this session let us make you clear about the trick to use CSS3 animation.</p>
<p>In CSS3 animation 2 major properties are “animation” &amp; “@keyframes”. Refer to the below example I have a div with a class “animation”. To apply animation on this div I created a class animation. Inside the class I added CSS3 property animation: demoAnimation 5s;. Here demoAnimation is controlled by keyframes. Using @keyframes we need to define from &amp; to properties. As in this example I am moving a div from left to right, I positioned the div to absolute and applying left property from 0 to 200px. <a href="https://jharaphula.com/move-div-left-right-using-css3-animation/" target="_blank" rel="noopener noreferrer">Read more&#8230;</a></p>
<pre class="brush: css; title: ; notranslate">&lt;style type=&quot;text/css&quot;&gt;
.animation {
/* IE &amp; FireFox */
animation: demoAnimation 5s;
/* Chrome, Safari &amp; Opera */
-webkit-animation: demoAnimation 5s;
position: absolute;
}

/* IE &amp; FireFox */
@keyframes demoAnimation {
from {left: 0px; background: red;}
to {left: 200px; background: yellow;}
}

/* Chrome, Safari &amp; Opera */
@-webkit-keyframes demoAnimation {
from {left: 0px; background: red;}
to {left: 200px; background: yellow;}
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;animation&quot;&gt;This is a Div.&lt;/div&gt;
&lt;/body&gt;</pre>
<h3>CSS3 Shadow Effects</h3>
<p>Using Shadow effects we can get 3D look. If you worked for various Customers &amp; their requirements you must observed in many places Customer wants to use shadow effect. Lets take an example of a login page. Generally login page comes with a central panel. To make this more attractive Customer ask us to put shadow effects. This problem is noted down by CSS3 &amp; in CSS3 they addressed this problem. Using one property in CSS3 you can easily add shadow effect to any HTML element. CSS3 shadow is two types Text Shadow &amp; Box Shadow. Look at the example below.</p>
<p>Text Shadow:</p>
<pre class="brush: css; title: ; notranslate">p { 
text-shadow: 3px 3px 6px green;
}</pre>
<p>Box Shadow:</p>
<pre class="brush: css; title: ; notranslate">span {
box-shadow: 6px 6px 6px green;
}</pre>
<p>The post <a href="https://jharaphula.com/css3-new-features-gradients-webfonts/">CSS3 New Features (Gradients, Webfonts, Transitions, Shadow Effects&#8230;)</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/css3-new-features-gradients-webfonts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css3-coding.jpg" medium="image" />
	</item>
		<item>
		<title>How to Create div based CSS3 Table without using HTML5 Table tag?</title>
		<link>https://jharaphula.com/create-div-based-css-table/</link>
					<comments>https://jharaphula.com/create-div-based-css-table/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 18:41:27 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced CSS3]]></category>
		<category><![CDATA[CSS Table]]></category>
		<category><![CDATA[div based CSS Table]]></category>
		<category><![CDATA[How to Create]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1221</guid>

					<description><![CDATA[<img width="300" height="191" src="https://jharaphula.com/wp-content/uploads/2016/05/css-table.gif" class="webfeedsFeaturedVisual wp-post-image" alt="How to Create div based CSS Table without using HTML Table tag?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" /><p>Assume in your HTML page you are going to display 5000 records using a Table. In this case HTML table tag creates problem during loading....</p>
<p>The post <a href="https://jharaphula.com/create-div-based-css-table/">How to Create div based CSS3 Table without using HTML5 Table tag?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="191" src="https://jharaphula.com/wp-content/uploads/2016/05/css-table.gif" class="webfeedsFeaturedVisual wp-post-image" alt="How to Create div based CSS Table without using HTML Table tag?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" /><p>Assume in your HTML page you are going to display 5000 records using a Table. In this case HTML table tag creates problem during loading. Until 5000 records fetched from the database, table will not render. This delay creates <a href="https://jharaphula.com/best-practices-website-speed-performance/" target="_blank" rel="noopener noreferrer">performance issue in web</a> development. To avoid this scenario div is introduced. Div loads faster then a table. Partial loading feature supported by div. While all the row &amp; columns of a table comes with in the single control div presents each row &amp; column independently. Let us share the example how to create div based CSS table.</p>
<p>Look at the example below here I did created similar to table structure using Div &amp; CSS. To make this simple I used only 3 CSS classes tableHeader, row &amp; column. In HTML followed by the basic principle creating the row &amp; inside row creating columns. To separate tableHeader in place of row class I used tableHeader.</p>
<h2>div based CSS Table Example</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;How to Create div based CSS3 Table?&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.tableHeader
{
background: #000;
color: #fff;
display: table-row;
font-weight: bold;
}
/* CSS styles of table Rows */
.row
{
display: table-row;
}
/* CSS styles of table Columns */
.column
{
display: table-cell;
border: thin solid #000;
padding: 6px 6px 6px 6px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;tableHeader&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Employee Name&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Designation&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Salary&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Biswabhusan Panda&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Sr. Team Lead&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;80000 INR&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Supriti Kabi&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Software Engineer&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;60000 INR&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Nibedita Panda&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Jr. Software Engineer&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;45000 INR&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Ragini Sahoo&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Mechanical Engineer&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;25000 USD&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Sonam Panda&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Jr. Software Engineer&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;1500 USD&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Subha Roy&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Software Engineer&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;17000 INR&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Mohini Srivastab&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Mechanical Engineer&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;25000 INR&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;column&quot;&gt;Manjulata Panda&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;Business Head&lt;/div&gt;
&lt;div class=&quot;column&quot;&gt;5000 USD&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>Another way to Create div based CSS3 Table</h2>
<p>You must aware of 2 most wanted CSS3 properties float: left and float: right. Generally we use these syntax to place 2 or more div&#8217;s side-by-side. Using these properties you can create HTML Table like structue using div. Additionally, in this method you have to take care of clearfix. clearfix is a CSS class which comes with &#8220;clear: both;&#8221;.</p>
<p>The post <a href="https://jharaphula.com/create-div-based-css-table/">How to Create div based CSS3 Table without using HTML5 Table tag?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/create-div-based-css-table/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css-table.gif" medium="image" />
	</item>
		<item>
		<title>Why CSS3 Media Queries are beneficial for Responsive Web Designing?</title>
		<link>https://jharaphula.com/css3-media-queries-tutorial/</link>
					<comments>https://jharaphula.com/css3-media-queries-tutorial/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 18:10:45 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced CSS3]]></category>
		<category><![CDATA[CSS3 Interview Questions]]></category>
		<category><![CDATA[CSS3 Media Queries]]></category>
		<category><![CDATA[Responsive Web Designing]]></category>
		<category><![CDATA[RWD]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=1191</guid>

					<description><![CDATA[<img width="300" height="192" src="https://jharaphula.com/wp-content/uploads/2016/05/media-queries-300x192.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How Media Queries are beneficial for Responsive Layout?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/media-queries-300x192.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/media-queries.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Today web is one of the fastest data media in the world. Everyday more than millions of people are searching various information in web. I...</p>
<p>The post <a href="https://jharaphula.com/css3-media-queries-tutorial/">Why CSS3 Media Queries are beneficial for Responsive Web Designing?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="192" src="https://jharaphula.com/wp-content/uploads/2016/05/media-queries-300x192.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="How Media Queries are beneficial for Responsive Layout?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/media-queries-300x192.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/media-queries.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Today web is one of the fastest data media in the world. Everyday more than millions of people are searching various information in web. I can say web is the dictionary for information. Looking into this demand today web is not only available to computers but also <strong>you can access web from several devices</strong>. Technically speaking several devices means several resolutions. As an experienced UI developer you need to consider all those devices &amp; their resolutions while <a href="https://jharaphula.com/web-content-accessibility-guidelines/" target="_blank" rel="noopener noreferrer">design a web-page</a>. I mean to say while the end-user will fetch your web-page from any device, your web-page must need to compatible for that resolution depending upon the devices. This is called Responsive web designing.</p>
<p>On the way of responsive web designing <strong>CSS3 introduced Media Queries</strong>. Those are very powerful to handle any resolution related CSS styles. Let&#8217;s talk about some standard devices before move into media queries.</p>
<h2>Standard Devices</h2>
<table width="100%">
<tbody>
<tr>
<th>Devices</th>
<th>Resolution (In Width)</th>
<th>Pixels Ratio</th>
</tr>
<tr>
<td>iPhones 4 &amp; 4S</td>
<td>320px &#8211; 420px</td>
<td>2</td>
</tr>
<tr>
<td>iPhones 5 &amp; 5S</td>
<td>320px &#8211; 568px</td>
<td>2</td>
</tr>
<tr>
<td>iPhones 6</td>
<td>375px &#8211; 667px</td>
<td>2</td>
</tr>
<tr>
<td>iPhones 6+</td>
<td>414px &#8211; 736px</td>
<td>3</td>
</tr>
<tr>
<td>Galaxy S3</td>
<td>320px &#8211; 640px</td>
<td>2</td>
</tr>
<tr>
<td>Galaxy S4</td>
<td>320px &#8211; 640px</td>
<td>3</td>
</tr>
<tr>
<td>HTC Phones</td>
<td>360px &#8211; 640px</td>
<td>3</td>
</tr>
<tr>
<td>iPad mini</td>
<td>768px &#8211; 1024px</td>
<td>1</td>
</tr>
<tr>
<td>iPad 1 &amp; 2</td>
<td>768px &#8211; 1024px</td>
<td>1</td>
</tr>
<tr>
<td>iPad 3 &amp; 4</td>
<td>768px &#8211; 1024px</td>
<td>2</td>
</tr>
<tr>
<td>Galaxy Tablets</td>
<td>800px &#8211; 1280px</td>
<td>NA</td>
</tr>
<tr>
<td>Nexus Tablets</td>
<td>601px &#8211; 906px</td>
<td>1.332</td>
</tr>
<tr>
<td>Kindle Fire HD 7&#8243;</td>
<td>800px &#8211; 1280px</td>
<td>1.5</td>
</tr>
<tr>
<td>Kindle Fire HD 8.9&#8243;</td>
<td>1200px &#8211; 1600px</td>
<td>1.5</td>
</tr>
<tr>
<td>Laptops</td>
<td>1200px &#8211; 1600px</td>
<td>1 &amp; 2</td>
</tr>
<tr>
<td>Apple Watch</td>
<td>42mm &#8211; 38mm</td>
<td>NA</td>
</tr>
<tr>
<td>Moto 360 Watch</td>
<td>218px &#8211; 281px</td>
<td>NA</td>
</tr>
</tbody>
</table>
<p>Now from the above list you can understood how resolution varies from device to device. To optimize our web for various resolutions let us discuss how media queries are helpful.</p>
<h2>Introduction to CSS3 Media Queries</h2>
<p>Media Queries are CSS3 techniques through which we can detect width, height, aspect ratio, color, orientation or media types of any device. It helps to separate specific device depended style blocks. Look at the example below.</p>
<pre class="brush: css; title: ; notranslate">@media screen and (min-width: 768px) and (max-width: 1024px) {   
/* Styles for Screen Resolution 768px to 1024px */
}

@media screen and (max-width: 600px) {
/* Styles for Screen Resolution up to 600px */
}</pre>
<p>In this two block of code first block is for the screen resolution 768px to 1024px &amp; the second one is for screen width 600px or less.</p>
<h2>Syntax for CSS3 Media Queries</h2>
<p>There are two ways to write media queries. One is &#8220;Embed CSS&#8221; &amp; the other one is &#8220;Linked CSS&#8221;.</p>
<p>Embed CSS Syntax:</p>
<pre class="brush: css; title: ; notranslate">@media not|only mediatype and (media feature) {
/* Required Styles */
}</pre>
<p>Linked CSS Syntax:</p>
<pre class="brush: xml; title: ; notranslate">&lt;link rel=&quot;stylesheet&quot; media=&quot;mediatype and|not|only (media feature)&quot; href=&quot;deviceSpecific.css&quot;&gt;</pre>
<p>Using linked CSS you need to create separate style sheet files for respective devices. To refer those files you can use link tag with conditional media types &amp; features.</p>
<h2>Media Types</h2>
<table width="100%">
<tbody>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>All</td>
<td>Used for all media type devices.</td>
</tr>
<tr>
<td>print</td>
<td>Used for printers.</td>
</tr>
<tr>
<td>screen</td>
<td>Used for computers, laptop, tablets, phones etc.</td>
</tr>
</tbody>
</table>
<h3>Common used Media Features</h3>
<table width="100%">
<tbody>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>aspect-ratio</td>
<td>Aspect Ratio is nothing but the ratio between between width &amp; height of the Screen.</td>
</tr>
<tr>
<td>color</td>
<td>Defines the number of bits per color component for the Screen.</td>
</tr>
<tr>
<td>width</td>
<td>Define the width of Screen.</td>
</tr>
<tr>
<td>height</td>
<td>Define the height of Screen.</td>
</tr>
<tr>
<td>max-width</td>
<td>Defines the maximum width of the Screen.</td>
</tr>
<tr>
<td>min-width</td>
<td>Defines the minimum width of the Screen.</td>
</tr>
<tr>
<td>max-height</td>
<td>Defines the maximum height of the Screen.</td>
</tr>
<tr>
<td>min-height</td>
<td>Defines the minimum height of the Screen.</td>
</tr>
<tr>
<td>resolution</td>
<td>Defines the resolution of device, using dpi or dpcm.</td>
</tr>
<tr>
<td>orientation</td>
<td>Defines whether the Screen is in landscape mode or in portrait mode.</td>
</tr>
</tbody>
</table>
<p>The post <a href="https://jharaphula.com/css3-media-queries-tutorial/">Why CSS3 Media Queries are beneficial for Responsive Web Designing?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/css3-media-queries-tutorial/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/media-queries.jpg" medium="image" />
	</item>
		<item>
		<title>Horizontal Navigation menu with sub-menu using pure CSS Source Code</title>
		<link>https://jharaphula.com/responsive-horizontal-menu-pure-css/</link>
					<comments>https://jharaphula.com/responsive-horizontal-menu-pure-css/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 07:41:04 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced CSS3]]></category>
		<category><![CDATA[horizontal navigation menu]]></category>
		<category><![CDATA[menu using pure CSS]]></category>
		<category><![CDATA[Responsive horizontal menu]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=900</guid>

					<description><![CDATA[<img width="300" height="184" src="https://jharaphula.com/wp-content/uploads/2016/05/menu-demo-300x184.png" class="webfeedsFeaturedVisual wp-post-image" alt="Responsive horizontal navigation menu using pure CSS" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/menu-demo-300x184.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/menu-demo.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Compare to JavaScript or a JQuery menu pure CSS menu gives better performance. Are you looking to create a horizontal menu with sub-menu for your...</p>
<p>The post <a href="https://jharaphula.com/responsive-horizontal-menu-pure-css/">Horizontal Navigation menu with sub-menu using pure CSS Source Code</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="184" src="https://jharaphula.com/wp-content/uploads/2016/05/menu-demo-300x184.png" class="webfeedsFeaturedVisual wp-post-image" alt="Responsive horizontal navigation menu using pure CSS" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/menu-demo-300x184.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/menu-demo.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Compare to JavaScript or a JQuery menu <strong>pure CSS menu gives better performance</strong>. Are you looking to create a horizontal menu with sub-menu for your web applications without using any third-party plugins? If so this example will help you. In this demo app we Created a responsive horizontal navigation menu using pure CSS. This menu works for all browsers like Google Chrome, Firefox and Safari. You can customize this source codes as per your business need.</p>
<p><em>Desktop View</em>:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-2957" src="https://jharaphula.com/wp-content/uploads/2016/05/menu.png" alt="menu" width="746" height="256" srcset="https://jharaphula.com/wp-content/uploads/2016/05/menu.png 746w, https://jharaphula.com/wp-content/uploads/2016/05/menu-300x103.png 300w" sizes="auto, (max-width: 746px) 100vw, 746px" /></p>
<p><em>Mobile View</em>:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-2958" src="https://jharaphula.com/wp-content/uploads/2016/05/responsive-view.png" alt="responsive-view" width="310" height="407" srcset="https://jharaphula.com/wp-content/uploads/2016/05/responsive-view.png 310w, https://jharaphula.com/wp-content/uploads/2016/05/responsive-view-229x300.png 229w" sizes="auto, (max-width: 310px) 100vw, 310px" /></p>
<h2>Example of Menu with Sub-menu using pure CSS</h2>
<p>In this example I have tabs like Home, About Us, Services, News &amp; Career. You can add or update tags as you want. This menu is supporting sub menu feature. Under About Us &amp; Services I added some sub menu items for demo purpose.</p>
<p>Technically to design this horizontal menu I used UL element of HTML. Using pure CSS I am defining color &amp; theme to the menu. For responsive I used <a href="https://jharaphula.com/css3-media-queries-tutorial/" target="_blank" rel="noopener noreferrer">CSS3 media queries</a>. In media query I configured the menu max-width to 750px. 750px is nothing but the total width of my horizontal menu (including all tabs).</p>
<p>This menu is designed using pure CSS, so according to your requirement <strong>you can Configure this menu easily</strong>. You can change width, height, font style, font color or font size as you want. To update colors &amp; theme you can update background for li &amp; anchor elements. To present mouse over effect here I used CSS hover. To update hover related changes you need to update li:hover related classes.</p>
<h2>Horizontal Navigation menu with sub-menu</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;Responsive horizontal menu using CSS&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;label for=&quot;display-menu&quot; class=&quot;our-menu&quot;&gt;Our Menu&lt;/label&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;display-menu&quot; role=&quot;button&quot; /&gt;
&lt;ul id=&quot;hor-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;#&quot;&gt;About Us&lt;/a&gt;
&lt;ul class=&quot;sub-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Our Mission&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Technology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Success Stories&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;#&quot;&gt;Services&lt;/a&gt;
&lt;ul class=&quot;sub-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;CMS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;UI Designing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Logo Designing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;WordPress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;SEO Optimization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;News&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Career&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;#&quot;&gt;Products&lt;/a&gt;
&lt;ul class=&quot;sub-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Off-page Optimization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Blog Writing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;MyCMS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;WordPress Blogs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Mobile Apps&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>CSS Source Code for Navigation menu</h2>
<pre class="brush: css; title: ; notranslate">&lt;style type=&quot;text/css&quot;&gt;
.our-menu { font-family: Arial, &quot;Times New Roman&quot;, Georgia; text-decoration: none; color: #ffffff; background: #054372; text-align: center; padding: 6px 0; display: none; }
#display-menu { display: none; }
#display-menu:checked ~ #hor-menu{ display: block; }

/*Style for horizontal CSS menu*/
ul { list-style-type:none; position: absolute; margin:0px; padding:0px; }
li { float: left; margin-right: 1px; display:inline-block; }
li a { display: block; text-decoration: none; height: 35px; min-width: 145px; text-align: center; line-height: 35px; font-family: Arial, &quot;Times New Roman&quot;, Georgia; color: #ffffff; background: #197DCB; }
li:hover a { background: #054372; }
li:hover ul a { background: #f3f3f3; color: #2f3036; line-height: 35px; height: 35px; }
li:hover ul a:hover { background: #054372; color: #ffffff; }
li ul { display: none; }
li ul li { display: block; float: none; }
li ul li a { width: auto; min-width: 120px; padding: 0 15px; }
ul li a:hover + .sub-menu, .sub-menu:hover { display: block; }

/*Media Query for Responsive Design*/
@media screen and (max-width : 750px){
.our-menu { display:block; }
ul { position: static; display: none; }
li { margin-bottom: 1px; }
ul li, li a { width: 100%; }
}
&lt;/style&gt;</pre>
<h2>Benefits of Horizontal Navigation</h2>
<p>1. <strong>Space Efficiency</strong> Horizontal menus occupy minimal vertical space, allowing more room for content. This is particularly useful for landing pages and blogs where screen real estate is valuable.</p>
<p>2. <strong>User-Friendly Design</strong> Users are accustomed to horizontal menus, as they mimic traditional reading patterns (left to right). This familiarity enhances usability and reduces cognitive load.</p>
<p>3. <strong>Mobile Responsiveness</strong> With proper design techniques, horizontal menus can adapt to smaller screens, often transforming into hamburger menus on mobile devices.</p>
<p>4. <strong>Aesthetic Appeal</strong> A well-designed horizontal menu contributes to a clean, professional layout, reinforcing brand identity and visual hierarchy.</p>
<h2>Best Practices for Designing Horizontal Navigation</h2>
<p>1. <strong>Keep It Simple</strong> Limit the number of menu items to avoid clutter. Seven or fewer links are ideal for optimal usability.</p>
<p>2. <strong>Prioritize Important Links</strong> Place high-priority pages (e.g., Home, About, Contact) on the far left, as users typically scan from left to right.</p>
<p>3. <strong>Use Clear Labels</strong> Avoid jargon—menu labels should be concise and descriptive (e.g., &#8220;Services&#8221; instead of &#8220;What We Offer&#8221;).</p>
<p>4. <strong>Ensure Responsiveness</strong> Test the menu on various devices to ensure it collapses or adjusts appropriately on smaller screens.</p>
<p>5. <strong>Highlight Active Pages</strong> Use visual cues (e.g., bold text, underlines) to indicate the current page, helping users orient themselves.</p>
<h2>Common Horizontal Navigation Styles</h2>
<p>Navigation menus are a critical component of web design, guiding users through a website efficiently. Among the various navigation styles, horizontal navigation remains one of the most popular due to its simplicity and ease of use. Several horizontal navigation styles serve different purposes, each with its own benefits and ideal use cases. The most common types include the Standard Menu, Mega Menu, Sticky Menu, and Centered Menu. Understanding these styles helps designers create intuitive and user-friendly interfaces.</p>
<h3>1. Standard Menu</h3>
<p>The Standard Menu consists of text-based links arranged in a single row, typically placed at the top of a webpage. This style is straightforward, making it ideal for websites with a limited number of pages or sections.</p>
<p><strong>Key Features</strong> </p>
<p>&#8211; Space-Efficient: Fits neatly in the header without overwhelming the layout.<br />
&#8211; Clear Hierarchy: Directly displays primary navigation options.</p>
<p>Best Use Cases Standard menus work well for small business websites, portfolios, and blogs where navigation requirements are minimal. They ensure quick access to essential pages without unnecessary complexity.</p>
<p><strong>Limitations</strong> </p>
<p>&#8211; Not suitable for websites with numerous categories or subcategories.<br />
&#8211; Limited space may require dropdowns for additional links, which can complicate usability.</p>
<p>Despite its simplicity, the Standard Menu remains a reliable choice for many websites due to its familiarity and ease of navigation.</p>
<h3>2. Mega Menu</h3>
<p>A Mega Menu is an expanded version of a dropdown menu, displaying multiple columns of navigation links and sometimes additional content like images or featured products. Unlike traditional dropdowns, Mega Menus provide a broader overview of a website’s structure, making them ideal for large e-commerce sites or content-heavy platforms.</p>
<p><strong>Key Features</strong> </p>
<p>&#8211; Multi-Column Layout: Organizes links into categories and subcategories efficiently.<br />
&#8211; Rich Media Support: Can include images, icons, or promotional banners.<br />
&#8211; Enhanced Usability: Reduces clicks by displaying more options at once.</p>
<p>Best Use Cases Mega Menus are commonly used by online retailers, news websites, and enterprise platforms where multiple sections need quick access. They improve user experience by minimizing the need for excessive scrolling or page changes.</p>
<p><strong>Limitations</strong> </p>
<p>&#8211; Requires ample space and careful design to avoid visual clutter.</p>
<p>When implemented effectively, Mega Menus enhance discoverability and streamline navigation for complex websites.</p>
<h3>3. Sticky Menu</h3>
<p>A Sticky Menu, also known as a fixed or floating menu, remains visible at the top of the screen even as users scroll down the page.</p>
<p><strong>Key Features</strong> </p>
<p>&#8211; Persistent Visibility: Always available regardless of scrolling position.<br />
&#8211; Improved Accessibility: Users don’t need to scroll back to the top to navigate.<br />
&#8211; Space Optimization: Maintains navigation without taking up excessive screen real estate.</p>
<p>Best Use Cases Sticky Menus are beneficial for e-commerce sites, blogs, and single-page applications where continuous access to navigation improves the browsing experience.</p>
<p><strong>Limitations</strong> </p>
<p>&#8211; Can obstruct content if not designed with adequate spacing.<br />
&#8211; May not be necessary for short pages where scrolling is minimal.</p>
<p>For websites prioritizing user convenience, the Sticky Menu is an effective solution to keep navigation within reach.</p>
<h3>4. Centered Menu</h3>
<p>A Centered Menu aligns navigation links in the middle of the header rather than the traditional left or right orientation. This style is often used for minimalist or modern designs, creating a balanced and aesthetically pleasing layout.</p>
<p><strong>Key Features</strong> </p>
<p>&#8211; Visual Appeal: Creates a symmetrical and clean look.<br />
&#8211; Design Flexibility: Works well with logos placed on either side.<br />
&#8211; Unique Branding: Differentiates from conventional navigation styles.</p>
<p>Best Use Cases Centered Menus are ideal for creative agencies, personal portfolios, and luxury brands looking for a distinctive and elegant navigation solution.</p>
<p><strong>Limitations</strong> </p>
<p>&#8211; Limited space may restrict the number of links.<br />
&#8211; Can appear awkward if too many items are forced into the center.</p>
<p>When executed properly, the Centered Menu adds a touch of sophistication to a website’s design while maintaining functionality.</p>
<h2>Conclusion</h2>
<p>Horizontal navigation menus remain a staple in web design due to their efficiency, familiarity, and adaptability. By following best practices in design and development, they can significantly enhance user experience while maintaining a sleek, professional appearance. Whether for a corporate site or a personal blog, a well-structured horizontal menu ensures seamless navigation and engagement.</p>
<p>The post <a href="https://jharaphula.com/responsive-horizontal-menu-pure-css/">Horizontal Navigation menu with sub-menu using pure CSS Source Code</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/responsive-horizontal-menu-pure-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/menu-demo.png" medium="image" />
	</item>
		<item>
		<title>CSS3 Sprite images Example to reduce HTTP Requests</title>
		<link>https://jharaphula.com/css-sprite-images-example/</link>
					<comments>https://jharaphula.com/css-sprite-images-example/#comments</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 07:40:02 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Advanced CSS3]]></category>
		<category><![CDATA[CSS attributes]]></category>
		<category><![CDATA[CSS Sprite images]]></category>
		<category><![CDATA[reduce HTTP Requests]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=898</guid>

					<description><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-300x194.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS Sprite images Example to reduce HTTP Requests" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-300x194.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>CSS3 Sprite is neither a method nor an attribute in CSS. CSS Sprite is a simple trick to load multiple images with a single http...</p>
<p>The post <a href="https://jharaphula.com/css-sprite-images-example/">CSS3 Sprite images Example to reduce HTTP Requests</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="194" src="https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-300x194.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="CSS Sprite images Example to reduce HTTP Requests" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-300x194.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-294x190.jpg 294w, https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example-106x70.jpg 106w, https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>CSS3 Sprite is neither a method nor an attribute in CSS. CSS Sprite is a simple trick to load multiple images with a single http request. This is the cause CSS Sprite helps to <a href="https://jharaphula.com/best-practices-website-speed-performance/" target="_blank" rel="noopener noreferrer">improve performance of a web application</a> by reducing the loading time for several images. To implement CSS Sprite we need CSS attributes like Width, Height, Background, Position Left &amp; Right.</p>
<p>Look at the example below. Here I have a single png file (demoImg.png) with 4 sub images. Sub images are cloud, clock, message &amp; love symbols. Using CSS3 Sprite I am showing all these 4 sub images to each individual HTML image tags. To identify image tags I used id&#8217;s (#cloud, #clock, #message &amp; #love) for each img tag. By setting image src=&#8221;trans.gif&#8221; I am loading an transparent image similar to the width &amp; height of sub image. To show each image individually with respective image tag I am applying CSS attributes background, width &amp; height to the image using id selector.</p>
<h2>How CSS3 Sprite works?</h2>
<p>Inside the id selector I am applying background (background: url(&#8220;demoImg.png&#8221;) no-repeat scroll 0 0 rgba(0, 0, 0, 0);) for img tag. Look at this line of code here after scroll 0 0 is the position of background image. First 0 is indicating &#8220;Left&#8221; &amp; the second one is &#8220;Top&#8221;. To display the first image &#8220;cloud&#8221;, I have left:0px &amp; top:0px. While for the second image &#8220;clock&#8221; (background: url(&#8220;demoImg.png&#8221;) no-repeat scroll -194px 0 rgba(0, 0, 0, 0);) I have left:-194px &amp; top:0px;. For each image selector url of the background is pointing to the same image demoImg.png. But by setting position I am showing each individual image independently. This trick is called CSS Sprite. Keep remember after positioning the required image from the total image file set the width &amp; height similar to the width &amp; height of image you are going to show in HTML image tag.</p>
<h2>CSS3 Sprite images Example</h2>
<p>To run the below example Copy this HTML code to an index.html file. Then save below 2 images (trans.gif &amp; demoImg.png) to the same folder &amp; Open the index.html.</p>
<h3>Index.htm</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;CSS Sprite images Example&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
#cloud {
background: url(&quot;demoImg.png&quot;) no-repeat scroll 0 0 rgba(0, 0, 0, 0);
height: 132px;
width: 184px;
}
#clock {
background: url(&quot;demoImg.png&quot;) no-repeat scroll -194px 0 rgba(0, 0, 0, 0);
height: 132px;
width: 184px;
}
#message {
background: url(&quot;demoImg.png&quot;) no-repeat scroll -391px 0 rgba(0, 0, 0, 0);
height: 132px;
width: 184px;
}
#love {
background: url(&quot;demoImg.png&quot;) no-repeat scroll -585px 0 rgba(0, 0, 0, 0);
height: 132px;
width: 184px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;img id=&quot;cloud&quot; src=&quot;trans.gif&quot; alt=&quot;Cloud&quot; title=&quot;Cloud&quot; /&gt;&lt;br /&gt;
&lt;img id=&quot;clock&quot; src=&quot;trans.gif&quot; alt=&quot;Clock&quot; title=&quot;Clock&quot; /&gt;&lt;br /&gt;
&lt;img id=&quot;message&quot; src=&quot;trans.gif&quot; alt=&quot;Message&quot; title=&quot;Message&quot; /&gt;&lt;br /&gt;
&lt;img id=&quot;love&quot; src=&quot;trans.gif&quot; alt=&quot;Love&quot; title=&quot;Love&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p><strong>CSS3 Sprite demo app images to Download</strong></p>
<p><em>trans.gif</em></p>
<div style="width: 184px; height: 132px; border: 1px solid gray;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3424" src="https://jharaphula.com/wp-content/uploads/2016/05/trans.gif" alt="trans" width="184" height="132" /></div>
<div style="padding-bottom: 20px;"></div>
<p><em>demoImg.png</em></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3425" src="https://jharaphula.com/wp-content/uploads/2016/05/demoImg.png" alt="demoImg" width="768" height="131" srcset="https://jharaphula.com/wp-content/uploads/2016/05/demoImg.png 768w, https://jharaphula.com/wp-content/uploads/2016/05/demoImg-300x51.png 300w" sizes="auto, (max-width: 768px) 100vw, 768px" /></p>
<p>The post <a href="https://jharaphula.com/css-sprite-images-example/">CSS3 Sprite images Example to reduce HTTP Requests</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/css-sprite-images-example/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css-sprite-example.jpg" medium="image" />
	</item>
		<item>
		<title>How to Move a DIV from Left to Right using CSS3 Animation?</title>
		<link>https://jharaphula.com/move-div-left-right-using-css3-animation/</link>
					<comments>https://jharaphula.com/move-div-left-right-using-css3-animation/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Sat, 14 May 2016 07:38:45 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[CSS3 Animation]]></category>
		<category><![CDATA[DIV from Left to Right]]></category>
		<category><![CDATA[JavaScript Animation]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=895</guid>

					<description><![CDATA[<img width="300" height="187" src="https://jharaphula.com/wp-content/uploads/2016/05/css-animation-300x187.png" class="webfeedsFeaturedVisual wp-post-image" alt="How to move a div from left to right using CSS3 Animation?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-animation-300x187.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-animation.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Compare to Flash or JavaScript animation CSS3 animation render faster. Animation is a new feature introduced in CSS3. Performance wise CSS3 is more programmers friendly....</p>
<p>The post <a href="https://jharaphula.com/move-div-left-right-using-css3-animation/">How to Move a DIV from Left to Right using CSS3 Animation?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="187" src="https://jharaphula.com/wp-content/uploads/2016/05/css-animation-300x187.png" class="webfeedsFeaturedVisual wp-post-image" alt="How to move a div from left to right using CSS3 Animation?" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-animation-300x187.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-animation.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>Compare to Flash or JavaScript animation CSS3 animation render faster. Animation is a new feature <a href="https://jharaphula.com/category/programming-solutions/css-code-tutorials/" rel="noopener noreferrer" target="_blank">introduced in CSS3</a>. Performance wise CSS3 is more programmers friendly. In this session let us make you clear about the trick to use CSS animation.</p>
<p>In CSS3 2 major properties are &#8220;animation&#8221; &amp; &#8220;@keyframes&#8221;. Refer to the below example I have a div with a class &#8220;animation&#8221;. To apply animation on this div I created a class animation. Inside the class I added CSS3 property animation: demoAnimation 5s;. Here demoAnimation is controlled by keyframes. Using @keyframes we need to define from &amp; to properties. As in this example I am moving a div from left to right, I positioned the div to absolute and applying left property from 0 to 200px.</p>
<p>To support animation in all browser here I used animation property for IE &amp; FireFox. To render the same in Google Chrome, Safari &amp; Opera I used -webkit-animation. The similar I did for @keyframes.</p>
<p>CSS animation comes with some major properties like animation, @keyframes, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state &amp; animation-timing-function.</p>
<h2>Move a DIV from Left to Right Example</h2>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;How to move a div from left to right?&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.animation {
/* IE &amp; FireFox */
animation: demoAnimation 5s;
/* Chrome, Safari &amp; Opera */
-webkit-animation: demoAnimation 5s;
position: absolute;
}

/* IE &amp; FireFox */
@keyframes demoAnimation {
from {left: 0px; background: red;}
to {left: 200px; background: yellow;}
}

/* Chrome, Safari &amp; Opera */
@-webkit-keyframes demoAnimation {
from {left: 0px; background: red;}
to {left: 200px; background: yellow;}
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;animation&quot;&gt;This is a Div.&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>CSS3 Animation</h2>
<p>CSS3 has revolutionized web design by introducing powerful animation capabilities that allow developers to create smooth, engaging, and interactive experiences without relying on JavaScript or Flash. With CSS3 animations, designers can bring elements to life through transitions, transforms, and keyframe-based animations, enhancing user engagement and visual appeal.</p>
<p>At its core, CSS3 animation includes three primary techniques: transitions, transforms, and keyframe animations. Each of these techniques serves its purpose, allowing designers to choose the most effective means of delivering their message.</p>
<p><strong>Transitions</strong></p>
<p>**Transitions** are the simplest form of CSS animation. They enable property changes in CSS to occur smoothly over a specified duration. For instance, if a user hovers over a button, a transition can make the button change color or size gradually rather than instantaneously. This subtle effect enhances interactivity, providing visual feedback that guides users as they navigate.</p>
<p><strong>Transforms</strong></p>
<p>**Transforms** take this a step further. They allow elements to be moved, scaled, rotated, or skewed without affecting the surrounding elements. For example, a designer can create a card that rotates slightly when a user hovers over it, drawing attention and creating an interactive feel. This type of animation is also hardware-accelerated, ensuring that the experience remains smooth even on devices with lower performance capabilities.</p>
<h2>Understanding CSS3 Animation</h2>
<p>CSS3 animations enable the gradual change of an element’s style from one state to another. Unlike CSS transitions, which are limited to simple property changes, animations provide greater control over intermediate steps using keyframes. This makes them ideal for complex, multi-step effects.</p>
<p>One of the most significant advantages of CSS3 animation is its efficiency. Animations created with CSS are often lighter than those utilizing JavaScript or Flash, leading to faster load times and improved user experience. Additionally, CSS animations are more accessible; they can be executed with just a few lines of code, making them highly usable for developers of all skill levels.</p>
<p>Another critical aspect of CSS3 animation is responsiveness. As web design increasingly shifts towards mobile-first approaches, it’s essential for animations to be functional and elegant across various devices. CSS3 is inherently responsive; designers can use media queries to modify animations based on screen size, ensuring a consistent experience for all users.</p>
<p>Key Components of CSS3 Animation</p>
<p><strong>1. Keyframes</strong> – The foundation of CSS3 animation, keyframes define the styles at various points during the animation sequence. Using `@keyframes`, developers specify how an element should appear at specific intervals (e.g., 0%, 50%, 100%).</p>
<p><strong>2. Animation Properties</strong> – CSS provides several properties to control animations: &#8211; `animation-name` – Specifies the keyframe rule to use. &#8211; `animation-duration` – Sets how long the animation lasts.</p>
<h2>Conclusion</h2>
<p>CSS3 animations offer a powerful, lightweight way to enhance web interactivity and aesthetics. By mastering keyframes, animation properties, and performance optimization, developers can create visually compelling experiences that captivate users. Whether for subtle micro-interactions or complex motion graphics, CSS3 animations remain an essential tool in modern web design.</p>
<p>The post <a href="https://jharaphula.com/move-div-left-right-using-css3-animation/">How to Move a DIV from Left to Right using CSS3 Animation?</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/move-div-left-right-using-css3-animation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css-animation.png" medium="image" />
	</item>
		<item>
		<title>Tricks to Draw CSS Triangle using DIV without Images</title>
		<link>https://jharaphula.com/tricks-draw-css-triangle-div/</link>
					<comments>https://jharaphula.com/tricks-draw-css-triangle-div/#respond</comments>
		
		<dc:creator><![CDATA[Biswabhusan Panda]]></dc:creator>
		<pubDate>Fri, 13 May 2016 19:10:40 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[Cleaver UI developer]]></category>
		<category><![CDATA[CSS in UI designing]]></category>
		<category><![CDATA[CSS Triangle using DIV]]></category>
		<category><![CDATA[Draw CSS Triangle]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=771</guid>

					<description><![CDATA[<img width="300" height="183" src="https://jharaphula.com/wp-content/uploads/2016/05/triangle-300x183.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Tricks to draw CSS Triangle using Div without images" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/triangle-300x183.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/triangle.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>As a cleaver UI developer you must need to know the Tricks how to use CSS in UI designing. CSS provides plenty of tricks to...</p>
<p>The post <a href="https://jharaphula.com/tricks-draw-css-triangle-div/">Tricks to Draw CSS Triangle using DIV without Images</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="183" src="https://jharaphula.com/wp-content/uploads/2016/05/triangle-300x183.jpg" class="webfeedsFeaturedVisual wp-post-image" alt="Tricks to draw CSS Triangle using Div without images" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/triangle-300x183.jpg 300w, https://jharaphula.com/wp-content/uploads/2016/05/triangle.jpg 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>As a cleaver UI developer you must need to know the <strong>Tricks how to use CSS in UI designing</strong>. CSS provides plenty of tricks to make our web development easier &amp; faster. Recently during a Login page design I instructed to implement a triangle below the Login box header (<em>As shown in the below image</em>) using Div &amp; CSS. The same can be done using an arrow image but the <a href="https://jharaphula.com/css3-new-features-gradients-webfonts/" target="_blank" rel="noopener noreferrer">benefits of using CSS</a> is to make the application lightweight &amp; more programmer friendly. In place of image if we are using Div &amp; CSS in feature if required the triangle can be easily update to any shape &amp; size rather than generating a new arrow image. Also this technique of drawing a triangle is more compatible to control by programming. Look at the Code below here I am with an example of CSS Triangle. You can customize it as per your requirements.</p>
<p><img loading="lazy" decoding="async" src="https://jharaphula.com/wp-content/uploads/2016/05/login-screen.png" alt="login-screen" width="762" height="237" class="alignnone size-full wp-image-3003" srcset="https://jharaphula.com/wp-content/uploads/2016/05/login-screen.png 762w, https://jharaphula.com/wp-content/uploads/2016/05/login-screen-300x93.png 300w" sizes="auto, (max-width: 762px) 100vw, 762px" /></p>
<p>As per the above requirement for Login UI I need a triangle with Up direction. But here in the below example to make your understanding clear, I did draw 4 triangles with 4 directions (<em>Up Arrow Triangle, Down Arrow Triangle, Left Arrow Triangle &amp; Right Arrow Triangle</em>).</p>
<p><strong>Tricks I used</strong> to draw triangle using Div &amp; CSS are as below.</p>
<p><strong>1.</strong> In HTML body Declare a Div with a CSS Class.</p>
<p><strong>2.</strong> In the Class set width &amp; height to zero for the Div.</p>
<p><strong>3.</strong> If you are looking to draw an Up arrow triangle including width &amp; height in your CSS class add borders (<em>boder-left, border-right &amp; border-bottom</em>) except the border-top. I mean which is the direction for the triangle ignore that border settings.</p>
<p><strong>4.</strong> Now we have three border settings except border-top. The opposite of border-top is border-bottom. For border-bottom declare border-width, border-style &amp; border-color (<em>10px solid #000000;</em>). For other two border-left &amp; border-right replace border-color with transparent (<em>10px solid transparent;</em>).</p>
<h3>Code to draw Triangle</h3>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Tricks to draw CSS Triangle&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
/* CSS Class for Up Direction Arrow */
.upArrow {
width: 0px;
height: 0px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid #000000;
}
/* CSS Class for Down Direction Arrow */
.downArrow {
width: 0px;
height: 0px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #000000;
}
/* CSS Class for Left Direction Arrow */
.leftArrow {
width: 0px;
height: 0px;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right:10px solid #000000;
}
/* CSS Class for Right Direction Arrow */
.rightArrow {
width: 0px;
height: 0px;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-left: 10px solid #000000;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;!-- Div to Draw Arrow with Up direction --&gt;
&lt;div class=&quot;upArrow&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;!-- Div to Draw Arrow with Down direction --&gt;
&lt;div class=&quot;downArrow&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;!-- Div to Draw Arrow with Left direction --&gt;
&lt;div class=&quot;leftArrow&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;!-- Div to Draw Arrow with Right direction --&gt;
&lt;div class=&quot;rightArrow&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a href="https://jharaphula.com/tricks-draw-css-triangle-div/">Tricks to Draw CSS Triangle using DIV without Images</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/tricks-draw-css-triangle-div/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/triangle.jpg" medium="image" />
	</item>
		<item>
		<title>Padding, Border and Margin properties from CSS Box Model</title>
		<link>https://jharaphula.com/brief-about-css-box-model/</link>
					<comments>https://jharaphula.com/brief-about-css-box-model/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Tue, 10 May 2016 17:37:42 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[CSS Box Model]]></category>
		<category><![CDATA[CSS Syntax]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=203</guid>

					<description><![CDATA[<img width="300" height="186" src="https://jharaphula.com/wp-content/uploads/2016/05/box-model.gif" class="webfeedsFeaturedVisual wp-post-image" alt="Padding, Border and Margin properties from CSS Box Model" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" /><p>CSS Box Model is a box around the HTML elements. This area is divided into 3 parts Padding, Border &#38; Margin. Let us discuss about...</p>
<p>The post <a href="https://jharaphula.com/brief-about-css-box-model/">Padding, Border and Margin properties from CSS Box Model</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="186" src="https://jharaphula.com/wp-content/uploads/2016/05/box-model.gif" class="webfeedsFeaturedVisual wp-post-image" alt="Padding, Border and Margin properties from CSS Box Model" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" /><p>CSS Box Model is a box around the <a href="https://jharaphula.com/list-of-html5-new-tags/" target="_blank" rel="noopener noreferrer">HTML elements</a>. This area is divided into 3 parts Padding, Border &amp; Margin. Let us discuss about a HTML div with the content “This is a sample text.”. As shown in below figure, Padding is the nearest area to the div contents before border. Border is the boundary for your html elements. About margin it is area after border.</p>
<p>In web design, every element on a webpage needs to be defined clearly to ensure a smooth user experience. One fundamental aspect of this design is the use of borders. In CSS, the border property creates a delineation around HTML elements, enhancing aesthetics and usability. This article will explore the essential border properties in CSS and the additional features introduced with CSS3.</p>
<h3>Padding</h3>
<p>Padding has its 4 properties padding-top, padding-right, padding-bottom &amp; padding-left. This can be used using following CSS syntax.</p>
<p>Padding is a CSS property that defines the space inside an element, effectively pushing the content away from the edges of the container. This space can be adjusted independently on all four sides of the element—top, right, bottom, and left—allowing for greater control over the look and feel of your design.</p>
<pre class="brush: css; title: ; notranslate">.box-model {
padding-top: 100px;
padding-right: 200px;
padding-bottom: 300px;
padding-left: 400px;
}</pre>
<p>When designing for various screen sizes, it’s important to consider how padding will adapt. Using relative units such as percentages or `em` values instead of fixed units like pixels can provide a more responsive design. This way, padding will adjust according to the screen size, maintaining the <a href="https://jharaphula.com/how-to-arrange-furniture-in-a-square-living-room/">intended layout across</a> devices.</p>
<p>By declaring only padding it apply the same value for each of the above 4 properties.</p>
<pre class="brush: css; title: ; notranslate">.box-model {
padding: 100px;
}</pre>
<p>You can also declare padding using the following CSS syntax. Here the sequence is top, right, bottom &amp; left. I mean clock-wise.</p>
<pre class="brush: css; title: ; notranslate">.box-model { Padding: 100px 200px 300px 400px; }</pre>
<h3>Border</h3>
<p>Borders are an essential aspect of web design, allowing designers to define spaces and enhance the visibility of elements. With the basic properties of CSS and the advanced features offered by CSS3, you can achieve intricate designs that not only look good but also improve user navigation and interaction. By mastering border properties, you’ll elevate your web design skills and produce visually stunning websites.</p>
<p>As I discussed above border is the boundary line to your HTML elements. It has several properties. With the advanced version of CSS3 there are some additional properties to border. Here with I am discussing the most common used border properties from CSS &amp; CSS3.</p>
<p><strong>Border Style</strong></p>
<p>Border Style comes with none, dotted, dashed, solid, double, groove, ridge &amp; outset values. The default value for border style is none. Commonly used border styles are solid, dotted &amp; double. We can declare border style using the following CSS syntax.</p>
<pre class="brush: css; title: ; notranslate">.border-style {
    border-style: solid;
}</pre>
<p><strong>Border-width</strong></p>
<p>It provides width to the border of HTML elements. The unit of border-width is pixel. Border width has 3 per-defined properties. Thin, medium &amp; thick. We can declare CSS border width using the following Syntax.</p>
<pre class="brush: css; title: ; notranslate">.border-style {
    border-style: solid;
    border-width: thin;
}</pre>
<p>or</p>
<pre class="brush: css; title: ; notranslate">.border-style {
    border-style: solid;
    border-width: 2px;
}</pre>
<p>Remember if you only apply border-width to your class it will not show you the border. Because by default border-style is none.</p>
<p><strong>Border Color</strong></p>
<p>This property of border helps to update the border color. The following CSS syntax we used to achieve border colors.</p>
<pre class="brush: css; title: ; notranslate">.border-style {
    border-style: solid;
    border-width: 2px;
    border-color: red;
}</pre>
<p>In CSS3 the additional border properties are border-radius, box-shadow &amp; border-image. These properties works for IE 9 &amp; the higher version of IE 9.</p>
<h3>Margin</h3>
<p>Like the padding margin has its 4 properties. Margin-top, margin-right, margin-bottom &amp; margin-left. This can be used using the following CSS syntax.</p>
<p>In CSS, margin refers to the outer space surrounding an element. It effectively creates a buffer zone between different elements on a web page, allowing designers to adjust how close or far apart elements are from each other. This can enhance layout and organization, which is vital for providing a smooth user experience.</p>
<pre class="brush: css; title: ; notranslate">.box-model {
margin-top: 100px;
margin-right: 200px;
margin-bottom: 300px;
margin-left: 400px;
}</pre>
<p>Understanding how to effectively use margins is a fundamental skill for web designers and developers. By controlling the space around elements, you can create visually appealing layouts that improve readability and user interaction. Whether you&#8217;re crafting a simple blog or a complex web application, mastering the margin properties in CSS will undoubtedly elevate the quality of your design. Remember to experiment with different values and combinations to find what best suits your content and overall aesthetic!</p>
<p>By declaring only margin it apply the same value for each of the above 4 properties.</p>
<pre class="brush: css; title: ; notranslate">.box-model {
margin: 100px;
}</pre>
<p>You can also declare margin using the following CSS syntax. Here the sequence is top, right, bottom &amp; left. I mean clock-wise.</p>
<pre class="brush: css; title: ; notranslate">.box-model { margin: 100px 200px 300px 400px; }</pre>
<p>Refer CSS <a href="https://www.w3schools.com/css/css_boxmodel.asp" target="_blank" rel="noopener noreferrer nofollow">Box Model</a> from w3schools</p>
<p>The post <a href="https://jharaphula.com/brief-about-css-box-model/">Padding, Border and Margin properties from CSS Box Model</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/brief-about-css-box-model/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/box-model.gif" medium="image" />
	</item>
		<item>
		<title>Tricks behind CSS Position Property values Absolute and Fixed</title>
		<link>https://jharaphula.com/css-div-position-property/</link>
					<comments>https://jharaphula.com/css-div-position-property/#respond</comments>
		
		<dc:creator><![CDATA[Nibedita Panda]]></dc:creator>
		<pubDate>Tue, 10 May 2016 17:32:25 +0000</pubDate>
				<category><![CDATA[CSS Tricks with Examples]]></category>
		<category><![CDATA[CSS Position Property]]></category>
		<category><![CDATA[HTML elements]]></category>
		<category><![CDATA[Property in CSS]]></category>
		<guid isPermaLink="false">http://box.jharaphula.com/?p=201</guid>

					<description><![CDATA[<img width="300" height="188" src="https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties-300x188.png" class="webfeedsFeaturedVisual wp-post-image" alt="Tricks behind CSS Position Property values Absolute, Relative and Fixed" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties-300x188.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>The time we are designing a HTML page for more complex layout we do refer position using CSS. Basically this is used to position the...</p>
<p>The post <a href="https://jharaphula.com/css-div-position-property/">Tricks behind CSS Position Property values Absolute and Fixed</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></description>
										<content:encoded><![CDATA[<img width="300" height="188" src="https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties-300x188.png" class="webfeedsFeaturedVisual wp-post-image" alt="Tricks behind CSS Position Property values Absolute, Relative and Fixed" style="display: block; margin-bottom: 10px; clear: both; max-width: 100%;" decoding="async" loading="lazy" srcset="https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties-300x188.png 300w, https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties.png 750w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p>The time we are designing a HTML page for more complex layout we do refer position using CSS. Basically this is used to position the HTML elements. There are 6 possible values for position property in CSS. By default position is static. According to our requirements we can apply absolute, relative, fixed, initial &amp; inherit values to the position property in CSS.</p>
<p>Cascading Style Sheets (CSS) is a fundamental technology used to control the layout and presentation of web pages. Among its many properties, the `position` property is one of the most powerful yet often misunderstood. It determines how an element is positioned within a document, influencing its relationship with other elements and the viewport. The three most commonly used values—`absolute`, `relative`, and `fixed`—each serve distinct purposes in web design. Understanding these values is crucial for creating flexible and responsive layouts.</p>
<h3>Position: static;</h3>
<p>This is the default value for position property. By declaring position static it will render the HTML elements in order to the document flow.</p>
<h3>Position: absolute;</h3>
<p>Position absolute is the most trickiest positioning value. Let us take example to understand position absolute. In below example I am using position absolute for a div inside the div which is position relative.</p>
<p>The &#8216;position: absolute&#8217; value removes an element from the normal document flow, allowing it to be placed anywhere within its closest positioned ancestor (an element with a `position` value other than &#8216;static&#8217;).</p>
<p><strong>Key Characteristics of &#8216;position: absolute&#8217;:</strong></p>
<p>1. Breaks Document Flow – The element no longer affects the position of other elements, which may overlap or collapse into the space it once occupied.</p>
<p>2. Uses Nearest Positioned Parent – If a parent element has `relative`, `absolute`, or `fixed` positioning, the child element is positioned relative to that parent. Otherwise, it uses the document body.</p>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Using Position Absolute&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.posRelative { position: relative; top: 100px; left: 100px; }
.posAbsolute { position: absolute; top: 100px; left: 100px; }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;posRelative&quot;&gt;
&lt;div class=&quot;posAbsolute&quot;&gt;
This is the div where we applied position absolute.
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>This will give us first div in 100px left &amp; 100px from top position. The second div is applied with position absolute. In real-time the second div will appear 100px left &amp; top from the parent div.</p>
<p>If i am declaring the parent div position static then child div with position absolute will show in 100px top &amp; left from the top left corner of the browser window. Try with the example below.</p>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Using Position Absolute&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.posStatic { position: static; top: 100px; left: 100px; }
.posAbsolute { position: absolute; top: 100px; left: 100px; }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;posStatic&quot;&gt;
&lt;div class=&quot;posAbsolute&quot;&gt;
This is the div where we applied position absolute.
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>Position: fixed;</h3>
<p>Using position fixed we can set position of our <a href="https://jharaphula.com/list-of-html5-new-tags/" target="_blank" rel="noopener noreferrer">HTML element</a> from the top left corner of browser window.</p>
<p>The &#8216;position: fixed&#8217; value anchors an element to the viewport, meaning it remains in the same position even when the page is scrolled. This is commonly used for navigation bars, headers, or sticky elements.</p>
<p><strong>Key Characteristics of &#8216;position: fixed&#8217;:</strong></p>
<p>1. Viewport-Relative – The element is positioned relative to the browser window, not any parent container.</p>
<p>2. Stays in Place During Scrolling – Unlike &#8216;absolute&#8217; positioning, a fixed element does not move when the user scrolls.</p>
<p>3. Ignores Parent Elements – Even if a parent has &#8216;relative&#8217; or &#8216;absolute&#8217; positioning, the fixed element remains tied to the viewport.</p>
<h3>Position: relative;</h3>
<p>Using position relative the position is relative to its normal position. If I am declaring top:100px it will take the element to 100px down.</p>
<p>The &#8216;position: relative&#8217; value positions an element relative to its normal position in the document flow. Unlike &#8216;static&#8217; positioning, which does not allow adjustments via properties like &#8216;top&#8217;, &#8216;right&#8217;, &#8216;bottom&#8217;, or &#8216;left&#8217;, &#8216;relative&#8217; positioning enables fine-tuning an element&#8217;s placement.</p>
<p>Key Characteristics of &#8216;position: relative&#8217;:</p>
<p>1. Maintains Document Flow – The element remains in the normal flow, and surrounding elements behave as if it were in its original position.</p>
<p>2. Offset Adjustments – Using &#8216;top&#8217;, &#8216;bottom&#8217;, &#8216;left&#8217;, or &#8216;right&#8217; shifts the element from its default position.</p>
<p>3. Reference Point – The element&#8217;s new position is calculated based on where it would have been in the normal flow.</p>
<h3>Position: initial;</h3>
<p>Initial reset the position of an element to default value.</p>
<h3>Position: inherit;</h3>
<p>Using position inherit we can inherits this property from parent element. You can access CSS position property using JavaScript. The syntax we need to use is object.style.position=&#8221;fixed&#8221;.</p>
<h2>Common Mistakes</h2>
<p>1. Overusing Absolute Positioning – Excessive use can lead to layout instability, especially on responsive designs.</p>
<p>2. Forgetting a Positioned Parent – An `absolute` element without a positioned ancestor may appear in unexpected locations.</p>
<p>3. Ignoring Z-Index – Positioned elements can overlap; using `z-index` ensures proper layering.</p>
<h2>Conclusion</h2>
<p>Understanding the CSS &#8216;position&#8217; property is essential for mastering web layout design. By carefully selecting the appropriate positioning method and avoiding common pitfalls, designers can build more flexible and maintainable web pages. Whether aligning elements within a container or keeping a navigation bar visible at all times, mastering these techniques is a cornerstone of effective CSS development.</p>
<p>The post <a href="https://jharaphula.com/css-div-position-property/">Tricks behind CSS Position Property values Absolute and Fixed</a> appeared first on <a href="https://jharaphula.com">OneStop Shop</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jharaphula.com/css-div-position-property/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://jharaphula.com/wp-content/uploads/2016/05/css-position-properties.png" medium="image" />
	</item>
	</channel>
</rss>
