Skip to main content

Home/ Web Development, Design & Programming/ Group items tagged pre

Rss Feed Group items tagged

Soul Book

The Incredible Em & Elastic Layouts with CSS - 0 views

  • Elastic design uses em values for all elements. Ems are a relative size, written like this: 1em, 0.5em, 1.5em etc. Ems can be specified to three decimal places like so: 1.063em. “Relative” means: They are calculated based on the font size of the parent element. E.g. If a <div> has a computed font size of 16px then any element inside that layer —a child— inherits the same font size unless it is changed. If the child font size is changed to 0.75em then the computed size would be 0.75 × 16px = 12px. If the user increases (or decreases) text size in their browser, the whole interface stretches (or shrinks.)
  • All popular browsers have a default font size of 16px. Therefore, at the default browser setting, 1em = 16px.
  • The <body> inherits it unless styled otherwise using CSS. Therefore 1em = 16px, 0.5em = 8px, 10em = 160px and so on. We can now specify any element size we need to using ems!
  • ...9 more annotations...
  • However, (gasp) IE has a problem with ems. Resizing text from medium (default) to large in IE5/6 would lead to a huge increase in font size rather than the gradual one expected. So another selector is needed to get IE to behave: html{ font-size:100%; }
  • Let’s give our <body> some more style, and center everything in the viewport (this will be important later for our content wrapper.) Our initial CSS ends up like this: html{ font-size: 100%; } body{ font-size: 1em; font-family: georgia, serif; text-align: center; color: #444; background: #e6e6e6; padding: 0; margin: 0; }
  • 1 ÷ 16 × 740 = 46.25em (1 ÷ parent font-size × required pixel value = em value)
  • While we're here, we might as well add some typographic goodness by selecting a basic leading and adding some vertical rhythm, with everything expressed in ems.
  • Set a 12px font size with 18px line height and margin for paragraphs
  • Dividing the desired line height (18px) by the element font size (12px) gives us the em value for line height. In this example, the line height is 1 and a half times the font size: 1.5em. Add line height and margin properties to the CSS: p{ font-size: 0.750em; line-height: 1.5em; margin: 1.5em; } Now the browser will say to itself, “Oh, line height and margin is set to 1.5em, so that should be 1.5 times the font size. What’s the font size, again? 12px? OK, cool, make line height and margin 1.5 times that, so 18px.”
  • To retain our vertical rhythm we want to set an 18px line height and margin. Easy: If the font size is 18px then 18px in ems is 1em! Let’s add the properties to the CSS (and make the font weight light:) h1{ font-size: 1.125em; line-height: 1em; margin: 1em; font-weight: 300; }
  • Jon, good article and very useful chartm but your text sizing method has one major drawback. If elements with font-sizes set in em’s are nested, i.e with lists, these elements inherit the font size. Therefore each child element will be 0.75em (or 75%) of the previous one: See an example here. (Would have posted the code put it was coming out really ugly!) I would recommend against using that method and setting the global font size in the body tag i.e. 'font-size:75%' for 12px. Then only setting different font-sizes where necessary.
  • Thanks Will, interesting point, but that is solved with a simple font-size:1em on the first child. Retaining the default ensures that even images are sized correctly in ems. IE (surprise) will compute incorrectly against a parent length equivalent to 12px. My preference born out by some minor but painful computed size errors in complex layouts is not to adjust the body, and only set font size where necessary for specific elements.
  •  
    A nice and simple explanation of using EMs to make elastic layouts
Mark Wilson

The Ultimate Pre-Launch Checklist Guide For WordPress Websites - 0 views

  •  
    This is the perfect ultimate pre-launch checklist guide for your WordPress website development &launch; it is covered with WordPress security set up, development checklist, WP content, SEO plugins checklist
Vernon Fowler

Font sizing with rem - Snook.ca - 0 views

  • The problem with em-based font sizing is that the font size compounds. A list within a list isn't 14px, it's 20px. Go another level deeper and it's 27px!
  • The rem unit is relative to the root—or the html—element. That means that we can define a single font size on the html element and define all rem units to be a percentage of that. html { font-size: 62.5%; } body { font-size: 1.4rem; } /* =14px */ h1 { font-size: 2.4rem; } /* =24px */
  • We can specify the fall-back using px, if you don't mind users of older versions of Internet Explorer still being unable to resize the text (well, there's still page zoom in IE7 and IE8). To do so, we specify the font-size using px units first and then define it again using rem units. html { font-size: 62.5%; } body { font-size: 14px; font-size: 1.4rem; } /* =14px */ h1 { font-size: 24px; font-size: 2.4rem; } /* =24px */
  • ...3 more annotations...
  • I'm defining a base font-size of 62.5% to have the convenience of sizing rems in a way that is similar to using px.
  • consistent and predictable sizing in all browsers, and resizable text in the current versions of all major browsers
  • The compounding nature of em-based font-sizing can be frustrating so what else can we do?
Soul Book

CSS techniques I use all the time - 0 views

  • EM calculations Sizing text is always an important part of making a usable design. I start all my CSS files with the following rules: html { font-size:100.01%; } body { font-size:1em; } The explanation for this comes from "CSS: Getting Into Good Coding Habits:" This odd 100.01% value for the font size compensates for several browser bugs. First, setting a default body font size in percent (instead of em) eliminates an IE/Win problem with growing or shrinking fonts out of proportion if they are later set in ems in other elements. Additionally, some versions of Opera will draw a default font-size of 100% too small compared to other browsers. Safari, on the other hand, has a problem with a font-size of 101%. The current "best" suggestion is to use the 100.01% value for this property.
  • I used the following calculation: 14px/16px = .875, 18px/16px = 1.125. So my default text at 1 em would translate to 16px for most users, and my small text I sized at .875em which I can trust to result in 14px for most users, while my large text I sized at 1.125em which I can trust to result in 18px
  • Safe Fluid-width Columns I work with hybrid fluid layouts all the time, usually with max-width set at anywhere from 900 to 1000px. I usually have floated columns with percentage widths, and browsers will calculate these percentage widths to whole pixel values when rendering the columns.
  • ...3 more annotations...
  • A typical problem is the following: when a user has the viewport at a size that makes the outer container 999 pixels wide, if the first column is 60% and the second is 40%, IE 6 will always calculate the two columns as 600 and 400 pixels and as a result, the two will not fit (600+400 = 1 more than 999) and it will drop the second column. This is obviously not intended behavior, and in a world where we still have to use floats for columns (I can't wait for display:table support across all browsers), it's important to work around this problem. I used to give my last column 1 less percent (in this example, it would have 39% instead of 40%, but this would usually result in columns that don't quite fill up the container. Of late I have been giving the last column .4 less percent (in this example, 39.6%), which seems to work perfectly. Browsers will calculate this width and round up, but it will still fit even with an odd container width like 999px and I won't have to worry about dropped columns.
  • Filtering for Old Browsers To be honest, I barely support IE 6 nowadays. If there is something special about my layout that doesn't work in IE 6, I will simply filter it out of the CSS that IE 6 understands
  • Because old browsers like IE 6 don't support the "first child" selector (right caret >), I can do the following to make sure that IE 6 only gets the basic setting and all the new-fangled browsers get the right result: div#container { width:900px; } html>body div#container { width:auto; max-width:900px; } /* This overrides the previous declaration in new browsers only, IE 6 simply ignores it. */
  •  
    Excellent simple collection of CSS tips that are easy to remember and implement. It's an old article, but i think everything is still relevant
Kaitlyn Em

Web And Graphic Designing: Avoid Mistakes When Using Web Templates - 0 views

  •  
    Creating a website from the scratch may be troubling for many business owners looking to launch their business on the internet. You have two basic options to choose from: either hire a professional web design company or choose easy website designing in the form of web templates. Pre-built website templates can ease the difficulty of business owners by saving their time, money and efforts required in creating and in launching a website.
  •  
    Creating a website from the scratch may be troubling for many business owners looking to launch their business on the internet. You have two basic options to choose from: either hire a professional web design company or choose easy website designing in the form of web templates. Pre-built website templates can ease the difficulty of business owners by saving their time, money and efforts required in creating and in launching a website.
madi344

Tips to Choose a Low-code Platform for Your Business - 0 views

Tips to Choose a Low-code Platform for Your Business Many businesses and developers are increasingly turning to low-code/no-code platforms. Low-code platforms allow IT businesses and empl...

low code platform business management development platforms

started by madi344 on 04 Oct 21 no follow-up yet
mikhail-miguel

ECommerce Prompt Generator - 2 Mn+ Pre-built eCommerce Prompts (ecommerceprompts.com). - 0 views

  •  
    ECommerce Prompt Generator: 2 Mn+ Pre-built eCommerce Prompts (ecommerceprompts.com).
balanceblind

Prispôsobiteľné filtre výsledkov? - 6 views

Bohužiaľ, webové stránky s prispôsobiteľnými filtrami na analýzu tabuliek výsledkov športových stávok nie sú k dispozícii všade. Je dobré, že mi moji priatelia poradili, aby som išiel na https://st...

dennisvdb

Why I Left Gulp and Grunt for npm Scripts - freeCodeCamp - 0 views

  •  
    "pre and post hooks" Why you should think twice before using Gulp or Grunt to automate your development workflow tasks probably NPM is all you need
Luciano Ferrer

8 Free Placeholder Image Services For Instant Dummy Images - 0 views

  •  
    "When designing websites, images-to-be-used usually doesn't exist at first as it is the layout that matters the most. However, the sizes for the images are usually pre-set and inserting some placeholder images help us better seeing/analyzing the layout. Rather than creating these placeholder images manually, there are free to use services which can automate the process and save us time."
sophia alex

Online Logo Company - 0 views

  •  
    Quick Logo Design: Professional, affordable and fast business logos, custom logos and pre-designed logos from one of the industry leaders around Dallas, Texas
Saurabh Mehta

Significant Points to Ask PHP Developer before Hire them - 0 views

  •  
    PHP developers or Hypertext Pre-processor developers are necessary for your company to be hired appropriately. They are meant to build up all kinds of programs for the web applications that are then directed to the user community, thus delivering your software development company some worthy advancement within the IT-infected society.
Redesign Unit

A Best Web Redesign Company can make your small company compete the big ones. - 0 views

  •  
    Best Web Redesign Company present but they usually provide a pre-designed website templates. This no doubt will help you save a few bucks but you will not get the benefits that are gained from a customized website
Aline Ohannessian

Marketing Video Skins - AWESOME Designs | Design Marketing Advertising Free Tips - 0 views

  •  
    Free AWESOME website video graphics! The package includes 8 styled skin templates - The best part, they are Pre-coded, you get the Skin images along with
Uzair Ahmed

Dolphin | 13styles CSS Menus - 0 views

  •  
    Pre-built in blue. Our most popular menu.
DJ XC

How to correctly insert a Flash into XHTML » La Trine - 0 views

  • Final Solution The complete code will then look like this (example + validator): <!--[if !IE]> --> <object type="application/x-shockwave-flash" data="movie.swf" width="300" height="135"> <!-- <![endif]--> <!--[if IE]> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="300" height="135"> <param name="movie" value="movie.swf" /> <!--><!--dgx--> <param name="loop" value="true" /> <param name="menu" value="false" /> <p>This is <b>alternative</b> content.</p> </object> <!-- <![endif]--> Maybe it's not a brilliantly elegant solution, but it's only truly functional
  •  
    Solucion para insertar Flash y que funcione en todos los navegadores
Inspirationfeed

How To Make Your Website Mobile - 0 views

  •  
    The mobile industry is heavily growing. Many people don't have a computer while commuting, but what they do have is their smartphone. Now a days you probably heard of the iPhone, Palm Pre, or Android phones. These are all smart phone used by millions of people each day. To give you an idea, the iP
Herb Tucker

Linux Knowledge Base and Tutorial - 0 views

  • The UMASK value masks out the bits. The permissions that each position in the UMASK masks out are the same as the file permissions themselves. So, the left-most position masks out the owner permission, the middle position the group, and the right most masks out all others. If we have UMASK=007, the permissions for owner and group are not touched. However, for others, we have the value 7, which is obtained by setting all bits. Because this is a mask, all bits are unset. (The way I remember this is that the bits are inverted. Where it is set in the UMASK, it will be unset in the permissions, and vice versa.)
  • The problem many people have is that the umask command does not force permissions, but rather limits them
  • Therefore, setting the UMASK=007 does not force creation of executable programs, unless the program creating the file does itself).
  • ...6 more annotations...
  • - - regular file c - character device b - block device d - directory p - named pipe l - symbolic link
  • Lets look at a more complicated example. Assume we have UMASK=047. If our program creates a file with permissions 777, then our UMASK does nothing to the first digit, but masks out the 4 from the second digit, giving us 3. Then, because the last digit of the UMASK is 7, this masks out everything, so the permissions here are 0. As a result, the permissions for the file are 730. However, if the program creates the file with permissions 666, the resulting permissions are 620. The easy way to figure out the effects of the UMASK are to subtract the UMASK from the default permissions that the program sets. (Note that all negative values become 0.)
  • You can change it anytime using the umask command. The syntax is simply umask <new_umask>
  • Here the <new_umask> can either be the numeric value (e.g., 007) or symbolic. For example, to set the umask to 047 using the symbolic notation, we have umask u=,g=r,o=rwx
  • Where "new_owner" is the name of the user account we want to sent the owner of the file to, and "filename" is the file we want to change. In addition, you can use chown to change not only the owner, but the group of the file as well. This has the general syntax: chown new_owner.new:group filename
  • Another useful trick is the ability to set the owner and group to the same ones as another file. This is done with the --reference= option, which sets to the name of the file you are referencing. If you want to change just the group, you can use the chgrp command, which has the same basic syntax as chown. Not that both chgrp and chmod can also take the --reference= option. Further, all three of these commands take the -R option, which recursively changes the permissions, owner or group.
sinliew

Web Designer or Developer: Double Your Rewards with Pre-Made Joomla Template shipped wi... - 0 views

smsabbir480

PHP online page viewer counter | technologytimefor - 0 views

  •  
    PHP (hypertext pre processor) has changed the way of web development.Now-a-days we can develop web applications easily by PHP.It has made web developing easier.Now i am presenting an page counter m...
1 - 20 of 46 Next › Last »
Showing 20 items per page