Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSS Basics Hide, Move, or Tweak (Almost) Anything in Your Community Sites.

Similar presentations


Presentation on theme: "CSS Basics Hide, Move, or Tweak (Almost) Anything in Your Community Sites."— Presentation transcript:

1 CSS Basics Hide, Move, or Tweak (Almost) Anything in Your Community Sites

2 FireFox browser FireBug Chrome browser Tools We’re going to use

3 Objectives 1.What is CSS & how it works 2.Live examples 3.Introduction to helpful tools 4.Your questions and real-life examples

4 Methodology YES Getting things done Good enough Fundamentals and building blocks NO Reinventing the wheel Pixel-perfect across every browser ever invented Definitive resource for all CSS

5 Cascading Style Sheets What is CSS? #Logo{ display:none; }.breadcrumb{ float:left; }.MPContentAreaHome #PrinterFriendly{ display:none; }.HLLandingControl ul li { border-bottom: none; list-style-type: disc; margin-bottom: 0px; padding-bottom: 0px; } Tells the web browser how the web page should look. What does CSS do?

6 HTML Anatomy & Terminology HTML STUFF... First heading My first paragraph. another paragraph...HTML STUFF Elements Tags …… Attributes Nesting Parent, child, sibling, descendent

7 CSS Anatomy & Terminology div{ Padding:10px 5px; } p{ Color: #f00; font-size: 16px; }.HLLandingControl ul li { border-bottom: none; list-style-type: disc; margin-bottom: 0px; padding-bottom: 0px; }

8 Every HTML element on the web is a rectangular box. Components of a box: Content Padding Border Margin Different elements have different default box styles. CSS let’s us control the characteristics of each box. The Box Model Content Padding Border Margin

9 From general to specific Tags – p – selects all elements with this tag. Class –.className – selects all elements with this class. ID – #idName – selects element with this ID. Combine the items above to select descendents Selectors HTML STUFF... First heading My first paragraph. paragraph...HTML STUFF

10 FireFox FireBug Chrome Notepad (or text editor or choice) JSFiddle Tools to help you get things done

11 Comment everything Keeping things organized /*=== GENERAL === */ #Logo{ display:none; }.breadcrumb{ float:left; } /*=== REMOVE PRINT FROM HOMEPAGE === */.MPContentAreaHome #PrinterFriendly{ display:none; } /*=== REMOVE HOEMPAGE LIST FORMAT=== */.HLLandingControl ul li { border-bottom: none; list-style-type: disc; margin-bottom: 0px; padding-bottom: 0px; } Not messing up your site Make a backup of your site and CSS for some trial and error.

12 Most commonly requested and used CSS trick in the HUG discussions. Easy to do. #Element2{ display:none; } Hiding elements Element 1 Element 2 Element 3 Element 4 Element 1 Element 3 Element 4

13 Increasing the padding or margin between items to nudge elements. Set the CSS Position property and then specify the elements new location. Moving elements on the page P{ position:relative; left:20px; top:20px; } 20px

14 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore VERITATIS ET QUASI ARCHITECTO dicta sunt explicabo. Overriding existing CSS Font (font-family) Size (font-size) Bold (font-weight) Spacing (line-height) Case (text-transform) Color (color) Tweaking elements Use !important to override inline CSS style.

15 Q&A and real-life examples More examples? What would you like to learn more about? Is there something specific on your site you’d like to change?

16 Resources & tools CSS & HTML fundamentals learn.shayhowe.com/html-css/ learn.shayhowe.com/html-css/ Mozilla CSS school https://developer.mozilla.org/en-US/learn/css https://developer.mozilla.org/en-US/learn/css JSFiddle to test out CSS www.jsfiddle.net www.jsfiddle.net Create CSS buttons www.cssbuttongenerator.com www.cssbuttongenerator.com FireBug http://getfirebug.com/ http://getfirebug.com/ Other HL sites Use FireBug-like tools to see under the hood of other websites HUG http://hug.higherlogic.com/Home/ http://hug.higherlogic.com/Home/ Me (Justin Prevatte) Email or Message me on HUG if you have a question and I’ll do my best to help out.

17 Justin Prevatte jnprevatte@gmail.com Contact Info HUG Profile Link

18


Download ppt "CSS Basics Hide, Move, or Tweak (Almost) Anything in Your Community Sites."

Similar presentations


Ads by Google