{"id":1927,"date":"2011-08-17T13:45:51","date_gmt":"2011-08-17T05:45:51","guid":{"rendered":"http:\/\/hazelong.com\/?p=1927"},"modified":"2011-08-17T13:45:51","modified_gmt":"2011-08-17T05:45:51","slug":"css-workflow-tutorial-design","status":"publish","type":"post","link":"https:\/\/musenmaker.com\/hazelong\/?p=1927","title":{"rendered":"Brief CSS Workflow tutorial without design"},"content":{"rendered":"<p>Today I would like to share how I usually CSS code a website without a pre made Photoshop design of the website. This is just the workflow that I usually follow and I hope you will enjoy my post \ud83d\ude42<\/p>\n<h3>The software<\/h3>\n<div id=\"attachment_1928\" style=\"width: 273px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1928\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-3-41-48-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1928\" class=\"size-full wp-image-1928\" title=\"Screen Shot 2011-08-14 at 3.41.48 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.41.48-PM.png\" alt=\"\" width=\"263\" height=\"288\" srcset=\"https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.41.48-PM.png 263w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.41.48-PM-200x219.png 200w\" sizes=\"auto, (max-width: 263px) 100vw, 263px\" \/><\/a><p id=\"caption-attachment-1928\" class=\"wp-caption-text\">CSSedit<\/p><\/div>\n<p>I usually use CSSedit because this is the software that allows me to code CSS the fastest. Through out this article, you will get to see what this software can do.<\/p>\n<p>If you are not using CSSedit, I recommend that you work with either <strong>Safari or Chrome <\/strong>in your CSS projects, this can save you a lot of hassle when you check other browsers later on.<\/p>\n<h3>Coding the theme core<\/h3>\n<p>So what I usually do is code my WordPress theme or website theme in PHP &amp; HTML first. I layout everything properly in divs without worrying about CSS.<\/p>\n<h3>Base CSS<\/h3>\n<div id=\"attachment_1929\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1929\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-3-42-05-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1929\" class=\"size-medium wp-image-1929\" title=\"Screen Shot 2011-08-14 at 3.42.05 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.42.05-PM-500x251.png\" alt=\"\" width=\"500\" height=\"251\" \/><\/a><p id=\"caption-attachment-1929\" class=\"wp-caption-text\">CSSedit&#39;s override function. Just open any website in the live preview and you can now override any CSS on the fly!<\/p><\/div>\n<p>Every good website need at least 2 starting CSS file. You need a <strong>reset.css<\/strong>, this is basically a bunch of CSS codes that tells every browser out there to behave the same. You will spend less time writing different codes for other browsers if you have a good <strong>reset.css.<\/strong><\/p>\n<p>Get your reset.css from either of these coders, that or write your own. Its just a one time thing. \ud83d\ude42<\/p>\n<ul>\n<li><a href=\"http:\/\/meyerweb.com\/eric\/tools\/css\/reset\/\">Eric Meyer&#8217;s reset<\/a><\/li>\n<li><a href=\"http:\/\/developer.yahoo.com\/yui\/3\/cssreset\/\">YUI 3 Yahoo reset<\/a><\/li>\n<li><a href=\"http:\/\/perishablepress.com\/press\/2007\/10\/23\/a-killer-collection-of-global-css-reset-styles\/\">and others..<\/a><\/li>\n<\/ul>\n<p>After throwing in the reset, you need your base CSS. By saying base, it means you need the essentials to style all the common attributes for today&#8217;s web. You may want to have different ones for certain CMS like for instance if you are on WordPress, you need to include styling for their post gallery and sticky posts.<\/p>\n<div id=\"attachment_1930\" style=\"width: 190px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1930\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-3-49-45-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1930\" class=\"size-medium wp-image-1930\" title=\"Screen Shot 2011-08-14 at 3.49.45 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.49.45-PM-180x500.png\" alt=\"\" width=\"180\" height=\"500\" \/><\/a><p id=\"caption-attachment-1930\" class=\"wp-caption-text\">An example of the base CSS that you can use to start up your CSS project each time<\/p><\/div>\n<p>This would be good enough to start you on any CSS project, try not to be too specific when it comes to this or else it will be hell of a ride to customize them. Keep them light with only some font styling and floats. As long as they are easy to change.<\/p>\n<div id=\"attachment_1932\" style=\"width: 304px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1932\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-3-49-53-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1932\" class=\"size-full wp-image-1932\" title=\"Screen Shot 2011-08-14 at 3.49.53 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.49.53-PM.png\" alt=\"\" width=\"294\" height=\"89\" srcset=\"https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.49.53-PM.png 294w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.49.53-PM-200x61.png 200w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/a><p id=\"caption-attachment-1932\" class=\"wp-caption-text\">Don&#39;t forget to include base CSS for form styling<\/p><\/div>\n<div id=\"attachment_1931\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1931\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-3-43-31-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1931\" class=\"size-medium wp-image-1931\" title=\"Screen Shot 2011-08-14 at 3.43.31 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.43.31-PM-500x301.png\" alt=\"\" width=\"500\" height=\"301\" \/><\/a><p id=\"caption-attachment-1931\" class=\"wp-caption-text\">Live Preview on the left, Style.css override on the right<\/p><\/div>\n<p>Once you are proper, you can fire up CSSedit and open up your live website on the left (in this case, art.hazelong.com) and override the main CSS file that you want to change. The funky thing about CSSedit is as you code, you can see the website transform automagically!<\/p>\n<p>As you can see, the website is now very bare but it looks simple enough for us to work on.<\/p>\n<h3>Headings is important<\/h3>\n<p>Each topic comes with a set of Covered CSS elements that you can research and <a href=\"http:\/\/www.w3schools.com\/css\/default.asp\">learn more about them<\/a> before you continue.<\/p>\n<p><strong>Covered CSS elements :<\/strong><\/p>\n<ol>\n<li>font-family<\/li>\n<li>font-size<\/li>\n<li>line-height<\/li>\n<li>H1,H2,H3,H4,H5<\/li>\n<\/ol>\n<p>First thing I like to do is establish the mood for the website, since we do not have a design to go with this time. The very first thing is to give it a nice font for all the headings and body text. This can determine the direction of the design.<\/p>\n<div id=\"attachment_1933\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1933\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/googlefont\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1933\" class=\"size-medium wp-image-1933\" title=\"googlefont\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/googlefont-500x261.jpg\" alt=\"\" width=\"500\" height=\"261\" \/><\/a><p id=\"caption-attachment-1933\" class=\"wp-caption-text\">Instant fonts for your website<\/p><\/div>\n<p>It&#8217;s 2011, unless you are still stuck in 2005 you can continue to use <strong>SIFR<\/strong> or images for fonts but all the cool dudes are using <strong><a href=\"http:\/\/code.google.com\/apis\/webfonts\/\">Google Font Api<\/a><\/strong> now. Make the switch!<\/p>\n<div id=\"attachment_1934\" style=\"width: 428px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1934\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-3-52-02-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1934\" class=\"size-medium wp-image-1934\" title=\"Screen Shot 2011-08-14 at 3.52.02 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-3.52.02-PM-418x500.png\" alt=\"\" width=\"418\" height=\"500\" \/><\/a><p id=\"caption-attachment-1934\" class=\"wp-caption-text\">Decide on the fonts and the design that you are going for.<\/p><\/div>\n<p>This is what I get after I have decided on the font families. I am not too worried about size or colors yet.<\/p>\n<h3>Position &amp; Size makes everything nice!<\/h3>\n<p><strong>Covered CSS elements :<\/strong><\/p>\n<ol>\n<li>position<\/li>\n<li>width, min-width, max-width<\/li>\n<li>vertical-align<\/li>\n<li>display<\/li>\n<li>*not recommended : height, min-height, max-height<\/li>\n<li>overflow<\/li>\n<li>float<\/li>\n<li>clear<\/li>\n<li>padding<\/li>\n<li>margin<\/li>\n<li>font-size<\/li>\n<\/ol>\n<p>Next comes the fun part. Push your divs up, down, left, right to get the layout that you want. Amend your code to allow for further CSS customization if need be.<\/p>\n<div id=\"attachment_1935\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1935\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-7-12-28-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1935\" class=\"size-medium wp-image-1935\" title=\"Screen Shot 2011-08-14 at 7.12.28 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-7.12.28-PM-500x358.png\" alt=\"\" width=\"500\" height=\"358\" \/><\/a><p id=\"caption-attachment-1935\" class=\"wp-caption-text\">At this stage, I only worry about positioning and making sure everything is the correct size. <\/p><\/div>\n<p>I don&#8217;t really care about colors for now but I block in some colors to get the feel that I want. I may change everything in the next step. Note that the number 5 in red aligns with the picture&#8217;s top. This is all about alignment, top, middle or bottom. Pick one that makes the design look clean.<\/p>\n<div id=\"attachment_1936\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1936\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-7-12-42-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1936\" class=\"size-medium wp-image-1936\" title=\"Screen Shot 2011-08-14 at 7.12.42 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-7.12.42-PM-500x281.png\" alt=\"\" width=\"500\" height=\"281\" \/><\/a><p id=\"caption-attachment-1936\" class=\"wp-caption-text\">Generous padding around text doesn&#39;t hurt your users&#39; eyes<\/p><\/div>\n<p>Learn the difference between <a href=\"http:\/\/lkamal.blogspot.com\/2006\/12\/margin-vs-padding-css-properties.html\">padding and margin<\/a>. I usually have a rule when I am working with paddings, I<strong> don&#8217;t declare padding on elements that has a declared width. <\/strong>This prevent a lot of browser conflicts with their different rendering of <a href=\"http:\/\/www.w3.org\/TR\/CSS2\/box.html\"><strong>box-model<\/strong>.<\/a><\/p>\n<p>Don&#8217;t do this :<\/p>\n<p>[css]div{width:500px; padding:20px}[\/css]<\/p>\n<p>Do this instead :<\/p>\n<p>[css]div{width:500px;}<br \/>\ndiv #element-inside-div{padding:20px}[\/css]<\/p>\n<div id=\"attachment_1937\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1937\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-7-12-52-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1937\" class=\"size-medium wp-image-1937\" title=\"Screen Shot 2011-08-14 at 7.12.52 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-7.12.52-PM-500x390.png\" alt=\"\" width=\"500\" height=\"390\" \/><\/a><p id=\"caption-attachment-1937\" class=\"wp-caption-text\">Buttons and links are given the proper padding and sizing. Grid layouts have to have the same margin horizontally and vertically<\/p><\/div>\n<p>I repeat this for all pages and make sure everything is in order before I continue to the next step. Here is a list of troubleshooting that might help you :<\/p>\n<ol>\n<li><strong>My floats fuck things up! <\/strong>Read more about <a href=\"http:\/\/colinaarts.com\/articles\/the-magic-of-overflow-hidden\/\">overflow:hidden<\/a><\/li>\n<li><strong>I don&#8217;t know how to align elements!<\/strong> Read more about <a href=\"http:\/\/sickdesigner.com\/resources\/display-property-demo\/index.html\">display<\/a>,<a href=\"http:\/\/kovshenin.com\/archives\/css-tricks-position-relative\/\"> position:relative<\/a> and use margin to push things to the desired position.<\/li>\n<li><strong>How do I get things to center?<\/strong> Read \u00a0more about <a href=\"http:\/\/simplebits.com\/notebook\/2004\/09\/08\/centering\/\">margin:0 auto<\/a>; <a href=\"http:\/\/phrogz.net\/css\/vertical-align\/index.html\">vertical-align<\/a> and text-align<\/li>\n<li><strong>My design looks messy, why?<\/strong> The more things that align together, the less messy your website will look. Be pixel perfect. Get <a href=\"http:\/\/iconfactory.com\/software\/xscope\">x-Scope<\/a> to help.<\/li>\n<\/ol>\n<h3>Pretty things and CSS3<\/h3>\n<p><strong>Covered CSS elements :<\/strong><\/p>\n<ol>\n<li>background-image, background-repeat, background-repeat<\/li>\n<li>color, backgound-color<\/li>\n<li>border<\/li>\n<\/ol>\n<p><strong>CSS3 generators that you will love:<\/strong><\/p>\n<ol>\n<li>Rounded corners \/\/ <a href=\"http:\/\/border-radius.com\/\">border-radius<\/a><\/li>\n<li>Background Gradient \/\/<a href=\"http:\/\/gradients.glrzad.com\/\"> via background-image<\/a><\/li>\n<li>Text Shadow \/\/ <a href=\"http:\/\/css3gen.com\/text-shadow\/\">text-shadow<\/a><\/li>\n<li>Other Shadows \/\/ <a href=\"http:\/\/css3gen.com\/box-shadow\/\">box-shadow<\/a><\/li>\n<\/ol>\n<div id=\"attachment_1942\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1942\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-10-19-23-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1942\" class=\"size-medium wp-image-1942\" title=\"Screen Shot 2011-08-14 at 10.19.23 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.19.23-PM-500x352.png\" alt=\"\" width=\"500\" height=\"352\" \/><\/a><p id=\"caption-attachment-1942\" class=\"wp-caption-text\">Note the icons for the search bar, email icon in the social sharing area and the number 5 background<\/p><\/div>\n<p>Icons and background images do a hell lot of difference. The first thing you gotta do is throw in a background image and then work on your icons. This is where you finalize your design, I have decided to change the Heading&#8217;s font. Pick a color scheme and stick to it. This is the final round.<\/p>\n<div id=\"attachment_1943\" style=\"width: 333px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1943\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/sprite\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1943\" class=\"size-full wp-image-1943\" title=\"sprite\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/sprite.png\" alt=\"\" width=\"323\" height=\"375\" srcset=\"https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/sprite.png 323w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/sprite-300x348.png 300w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/sprite-200x232.png 200w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/a><p id=\"caption-attachment-1943\" class=\"wp-caption-text\">Icons are all lumped into ONE single png file. (Yes you need the PNG fix plugin\/script)<\/p><\/div>\n<p>Before you save your icons separately one by one, note that the standard now allows us to put everything into one file, I usually call this the sprite.png. Loading this one time is better than requesting every single icon or background image. To use this file, you have to set the <strong>background-position<\/strong> so that the correct icon shows up.<\/p>\n<p>[css]#element{background-image:\/sprite.png;<br \/>\nbackground-repeat:no-repeat;<br \/>\nbackground-position: 30px 120px; \/* this finds the correct icon *\/ [\/css]<\/p>\n<div id=\"attachment_1944\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1944\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-10-19-50-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1944\" class=\"size-medium wp-image-1944\" title=\"Screen Shot 2011-08-14 at 10.19.50 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.19.50-PM-500x406.png\" alt=\"\" width=\"500\" height=\"406\" \/><\/a><p id=\"caption-attachment-1944\" class=\"wp-caption-text\">Buttons and background images clean up the design<\/p><\/div>\n<p>Now it is also time to do all the CSS3, so put in all the rounded corners and gradients that you want.<\/p>\n<div id=\"attachment_1945\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1945\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-10-20-18-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1945\" class=\"size-medium wp-image-1945\" title=\"Screen Shot 2011-08-14 at 10.20.18 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.20.18-PM-500x390.png\" alt=\"\" width=\"500\" height=\"390\" \/><\/a><p id=\"caption-attachment-1945\" class=\"wp-caption-text\">This current stage is also the only set of codes you need to change when you want to revamp your website according to trend.<\/p><\/div>\n<p>All these pretty stuff are dependent on trend, doing this at one go with one group of CSS separate from the positioning CSS makes it easier to change and amend when you decide to give your website a haul next time.<\/p>\n<h3>The Polishing and Finishing<\/h3>\n<p>This is the deciding step that separates the awesome design from the good design. You need user friendly stuff and also some easter eggs here and there. \u00a0For this step, you need to learn <strong>jQuery<\/strong>, <strong>HTML5<\/strong> or master <strong>CSS3 animation properties.<\/strong> Finishing touches does what it is called, it finishes a piece of creative work. If you skip this part, your design will lack the funk that it needs to have.<\/p>\n<div id=\"attachment_1946\" style=\"width: 301px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1946\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-10-21-24-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1946\" class=\"size-full wp-image-1946\" title=\"Screen Shot 2011-08-14 at 10.21.24 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.21.24-PM.png\" alt=\"\" width=\"291\" height=\"81\" srcset=\"https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.21.24-PM.png 291w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.21.24-PM-200x56.png 200w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/a><p id=\"caption-attachment-1946\" class=\"wp-caption-text\">Clicking on the form&#39;s input selects it and gives it a glow. (from Twitter trend)<\/p><\/div>\n<p>This is very subjective and depends on what you like after browsing the net every day. I have my own default set of finishing touches, and I add on to them in every website.<\/p>\n<div id=\"attachment_1947\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1947\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-10-22-38-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1947\" class=\"size-full wp-image-1947\" title=\"Screen Shot 2011-08-14 at 10.22.38 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.22.38-PM.png\" alt=\"\" width=\"480\" height=\"190\" srcset=\"https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.22.38-PM.png 480w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.22.38-PM-420x166.png 420w, https:\/\/musenmaker.com\/hazelong\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-10.22.38-PM-200x79.png 200w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><p id=\"caption-attachment-1947\" class=\"wp-caption-text\">Comment reply buttons fade in when you mouseover the comment<\/p><\/div>\n<p>Because my comments list design is mostly whitespace, having a button for every comment is a huge distraction and I have decided to keep them out of the eye&#8217;s sight until the user needs them.<\/p>\n<div id=\"attachment_1948\" style=\"width: 204px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1948\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-11-31-02-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1948\" class=\"size-full wp-image-1948\" title=\"Screen Shot 2011-08-14 at 11.31.02 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-11.31.02-PM.png\" alt=\"\" width=\"194\" height=\"134\" \/><\/a><p id=\"caption-attachment-1948\" class=\"wp-caption-text\">The longer the tag, the more popular it is<\/p><\/div>\n<p>I also wanted a multicolored tag cloud that makes the tag longer the more popular it is. The trick to do this is WordPress is very simple. I love to include a <strong>scripts.php<\/strong> in my theme (note that it is .php and not .js) Making it .php allows my scripts to take in PHP functions. The script that I use is included here, (I am still a noob in jQuery and nuked my Switch function so I switched to if\/else instead)<\/p>\n<p>[php]<script type=\"text\/javascript\">\/\/ <![CDATA[\nvar $j = jQuery.noConflict(); \/\/enable the use of $j\n$j(document).ready(function() {\n\/\/tags width\n$j(\".tagcloud a\").each( function(){\nvar topic = $j(this).attr('title').split(' '); \/\/splits the \"title = 5 topics\"\nvar percent = topic[0]\/*100 \/\/uses the number of topics and get the width of the tag from there\nvar color = \"#1E859E\" \/\/default color\n$j(this).css(\"width\", percent + '%' ); \/\/sets the width of the tag\nif (percent <= 10) { color = \"#1E859E\"; \/\/individual colors for each set } else if (percent > 10 && percent <= 20) { color = \"#209D9C\"; } else if (percent > 20 && percent <= 30) { color = \"#1F9E81\"; } else if (percent > 30 && percent <= 40) { color = \"#22B065\"; } else if (percent > 40 && percent <= 50) { color = \"#48B127\"; } else if (percent > 50 && percent <= 60) { color = \"#82B128\"; } else if (percent > 60 && percent <= 70) { color = \"#A9B128\"; } else if (percent > 70 && percent <= 80) { color = \"#B07126\"; } else if (percent > 80 && percent <= 90) { color = \"#B12727\"; } else if (percent > 90 && percent <= 100) { color = \"#B02547\"; } $j(this).css(\"background-color\", color ); \/\/sets the  background color }); });\n\/\/ ]]><\/script>[\/php]<\/p>\n<p>I also sorted my tags according to the topic count to make the design look neater.<\/p>\n<div id=\"attachment_1951\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1951\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-14-at-11-47-35-pm\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1951\" class=\"size-medium wp-image-1951\" title=\"Screen Shot 2011-08-14 at 11.47.35 PM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-14-at-11.47.35-PM-500x431.png\" alt=\"\" width=\"500\" height=\"431\" \/><\/a><p id=\"caption-attachment-1951\" class=\"wp-caption-text\">Don&#39;t forget your error pages<\/p><\/div>\n<h3>All done! Wait, now comes the horrid part!<\/h3>\n<div style=\"width: 510px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/images.cheezburger.com\/completestore\/2011\/8\/16\/68b5b5e0-96c0-4699-bc69-c55bdf303f9e.jpg\" alt=\"\" width=\"500\" height=\"375\" \/><p class=\"wp-caption-text\">Check your browser version. Omaikot I actually made a meme comic fml. <\/p><\/div>\n<p>One last thing to do, browser checking. Before you open up all the browsers and key in your website link, make sure your browser is updated to the latest version.<\/p>\n<div id=\"attachment_1954\" style=\"width: 510px\" class=\"wp-caption alignnone\"><a rel=\"attachment wp-att-1954\" href=\"http:\/\/hazelong.com\/blog\/2011\/08\/17\/css-workflow-tutorial-design\/screen-shot-2011-08-16-at-11-48-05-am\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1954\" class=\"size-medium wp-image-1954\" title=\"Screen Shot 2011-08-16 at 11.48.05 AM\" src=\"http:\/\/hazelong.com\/wp-content\/uploads\/2011\/08\/Screen-Shot-2011-08-16-at-11.48.05-AM-500x320.png\" alt=\"\" width=\"500\" height=\"320\" \/><\/a><p id=\"caption-attachment-1954\" class=\"wp-caption-text\">Decide on a set of browsers and check all of them<\/p><\/div>\n<p>It is usually like this,<strong> if it works on Safari it works on Chrome. If it works on Firefox, it most likely will work in Opera.<\/strong> Check all the forms, positioning and font-size. You can even be an anal ass by making screenshots of all of them and then layering all of them with the Difference blending mode in Photoshop. I don&#8217;t do that, \u00a0but if you want to be my guest.<\/p>\n<p>Since I work on Safari, Chrome plays nice with my website and I only need browser specific CSS for Firefox and Opera. This is the code that you will need to fix your CSS.<\/p>\n<p>[css]<br \/>\n\/*&#8211;Firefox&#8211;*\/<br \/>\n@-moz-document url-prefix() {<br \/>\n\/* your css here *\/<br \/>\n}<br \/>\n\/*&#8211;Opera&#8211;*\/<br \/>\n@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0){<br \/>\n\/* your css here *\/<br \/>\n}[\/css]<\/p>\n<p>What is next after this? After this, you will need to code a mobile theme, which will be discussed next time. Have fun coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I would like to share how I usually CSS code a website without a pre made Photoshop design of the website. This is just the workflow that I usually follow and I hope you will enjoy my&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1942,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1776],"tags":[1846,1888,1887,1889,1838,1890],"class_list":["post-1927","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding-tutorials","tag-coding","tag-css","tag-css3","tag-html","tag-php","tag-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=\/wp\/v2\/posts\/1927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1927"}],"version-history":[{"count":0,"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=\/wp\/v2\/posts\/1927\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=\/wp\/v2\/media\/1942"}],"wp:attachment":[{"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/musenmaker.com\/hazelong\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}