Skip to main content

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

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
Soul Book

Foundation 5 and Yeoman workflow - @juliancwirko - 3 views

  • This is the main grunt task
    • Soul Book
       
      If grunt command is not found then use: npm install -g grunt-cli first. 
  •  
    Great.
abubakr_hussain

lightspiners - Google Search - 0 views

    • abubakr_hussain
       
      nice
    • abubakr_hussain
       
      nice
  • #lightspinners | WEBSTA - Instagram Analyticshttps://websta.me/tag/lightspinnersCachedRakhi friendship band fidget spinners celebrate ur this rakhi with this band
  •  
    lightspinner studio
Strativ AB

Clear Goals Motivate Working In A Smarter Workflow - 1 views

  •  
    Goals are important. Goals give meaning to our work. However, unrealistic goals can set it. We do not want that. Therefore, you should have clear goals, as part of the smarter approach to a smarter workflow. What do clear goals mean then?
Strativ AB

What is Brand Marketing - 1 views

  •  
    Branding is the marketing practice of actively shaping your brand. That's the basic definition, but there is so much more that goes into it.
Strativ AB

7 Reasons You Should Learn Web Development - 0 views

  •  
    Maybe you have your reservations about starting a career in web development. Or, maybe it's a trade you haven't thought about yet. Either way, we've gathered seven reasons why you should learn development to help you decide if web development should be your next career move. Heard of web development bootcamps? https://strativ.se/en/smart-development/
dredd12

15 COMMON SEO MISTAKES FOR WHICH WEBSITE IS NOT GETTING NEW CUSTOMERS - 1 views

Real-time bidding starts as soon as a user has some ads to purchase or sell. But they should have something to offer in exchange. After selecting the suitable RTB platform, the next steps are: The...

#WEB DEVELOPMENT DESIGN SECURITY #WEBSITE MAINTENANCE

erickjhonkdkk82

Verified PayPal Accounts For Sale - 0 views

  •  
    Do you want to use a PayPal account for a long time? Buy verified paypal account from us. We will give you a paypal account that are fully verif ...
webtechnoz

Web Design Company Pune - 1 views

  •  
    We design, develop and deploy 100% responsive websites. We provide a professional team of experienced designers, developers and digital marketers who work with you to create your website.
‹ Previous 21 - 29 of 29
Showing 20 items per page