Las Vegas Website Design and Local SEO
  • Home
  • Website Services
    • Google My Business
    • Local Business Directory Citation Listing (NAP)
    • Social Media Marketing
    • Website Design
  • About
    • Contact Us
    • Shawn Lippert
    • Privacy Policy
    • Terms Of Use

CSS STYLE SCRIPTS

What is CSS? CSS -- Cascading Style Sheets. A cascading style sheet (CSS) allows you to control the appearance of your fonts, links, tables and more. This sheet provides a listing of essential properties and values. CSS makes your job easier. Trust me, it really does. Let's add some style right now, OK?(Just in case you want to READ about CSS
here's the developers reference.)

Click link to open chart
cascading_style_sheet_reference.htm
File Size: 57 kb
File Type: htm
Download File


Indent a Paragraph

When you read a book you'll notice that the first line of a paragraph is usually indented. Until CSS came along, there was no simple way to do this on web pages.
 If you'd like to indent the first line of your paragraphs, just paste the following into the HEAD section of your page or add the middle line of code to your linked stylesheets:
 <style >
<!--

p { text-indent: 2em;}

-->
</style>

So let's see what that looks like. Be sure you pull down the code to see WHERE I placed it. (Go to 'VIEW' then 'SOURCE')
Click on link to see it in action

indent_a_paragraph.htm
File Size: 0 kb
File Type: htm
Download File


HIGHLIGHTING

With CSS you can highlight text on a page, making it look like you ran a yellow highlight marker over it. This is great for emphasizing important words or points.
 Just add this code to the HEAD section of your HTML page:
 <style >
<!--

.HL {background: #ffff99;
color: #000000;}

-->
</style>

What you've done is create a CSS class, and now the table is set. To use it to highlight a passage, you could write:
 <font >this is highlighted</font>
 The words "this is highlighted" will have a yellow background with black text. Of course, you can change those colors to anything you want by modifying the colors in the CSS code.
 Let's not stop there. OK? What about if we wanted to highlight an entire paragraph? If you don't like messing with tables, try this style tag:
 <P ;>
 All of the text in the above paragraph will be highlighted in yellow-orange. To change that color, just substitute any other hex code or use a color name.
 This CSS tag works in both Netscape and Internet Explorer. 


SPACING FOR LINES & PARAGRAPHS

Sometimes the designer (YOU) doesn't want so much space between paragraphs. (Like when using bullets or such) You can control the space between paragraphs -- and lines -- like this:
 You can set the line height for paragraphs with a little CSS in the HEAD section of your HTML document, like this:
 <style >
<!--
P {line-height : 12px;}
-->
</style>

Just change the "12px" to however many pixels you need it to be. The comment tags should be included to prevent crotchety older browsers from displaying the code.
 You can set the line height for paragraphs with embedded style sheets -- CSS in the HEAD section of your HTML document -- like this:

<style >
<!--
p {line-height : 20px;}
-->
</style>

Just change the "20" in 20px (pixels) to the number you need.
 You can also place the CSS code right in your HTML tag, as an inline style.
 <p "line-height: 20px;">
 Both methods accomplish the same thing. The advantage of embedding them in the HEAD section is that the line height will be applied every time you use a <p> tag. With the inline style, you have to insert the CSS code into each paragraph
 Now let's see what it looks like, both in CODE and diplayed in the browser.
Click on link to  see it in action
spacing_for_lines_and_paragraphs.htm
File Size: 1 kb
File Type: htm
Download File


CSS UNDERLINE/OVERLINE LINKS

There are some very cool ways to handle links in your page. Here's one that uses the CSS to make your links look different. Just try underlining AND overlining them, framing them between horizontal lines. Just add:
 <style >
<!--
A:hover {text-decoration:overline underline}
-->
</style>

to the HEAD section of your page. The underline and overline will display whenever a visitor moves the cursor over the links.
 A variation: If you remove the word "underline" from the above code, the link will be underlined (with no overline) at rest, and overlined (with no underline) when a visitor's cursor is hovering over it. 
Click link to see an example

css_underline_overline_links.htm
File Size: 0 kb
File Type: htm
Download File


FORM ELEMENTS

There is a lot you can do with CSS. Here's an example of CSS working with form elements. Form elements can be a bit boring...so we're going to liven things up a bit.
 Let's first start with a simple head tag that will color all the elements in a text field box.
Click link to view example

form_elements.htm
File Size: 1 kb
File Type: htm
Download File

Category-CSS

Tags-CSS Style Scripts
css styles
css scripts
css script
css style
css

Powered by Create your own unique website with customizable templates.
  • Home
  • Website Services
    • Google My Business
    • Local Business Directory Citation Listing (NAP)
    • Social Media Marketing
    • Website Design
  • About
    • Contact Us
    • Shawn Lippert
    • Privacy Policy
    • Terms Of Use