Neal Grosskopf Dot Com A NG Designs Site

Neal Grosskopf Dot Com Return To Neal Grosskopf's Home Page a NG Designs Site

Toolbar

  • Skip To
    • Menu
    • Content
  • Validate
    • HTML
    • CSS
    • WAI
  • Font Size
    • Small
    • Medium
    • Large
    • Extra Large
  • Account
    • Create Account
    • Login

Interact

Navigation

  • Home
  • Interact
    • Blog
    • Message Board
    • Open Links
    • Open Videos
    • Photo Gallery
    • Polls
    • Reviews
    • Geek Speak
  • Designs
    • Professional
    • Corporate
    • Templates
    • Personal
    • Club
    • NG Designs
    • Web Classes
    • Web Guides
  • Files
    • Artwork
    • Wallpapers
    • My File Downloads
  • Extras
    • Bookmarklets
    • The Magic 8-Ball
    • Halo Statistics
    • My Web Footprint
    • Career Builder RSS Feed Generator

Geek Speak

  • Actions
    • View All
    • View Article Statistics
    • View User Statistics
    • Search
    • Subscribe to RSS Feed

Geek Speak Tags:

analytics,   asp,   browser comparision,   bug,   css,   css diagnostics,   css hacks,   css3,   dual-boot,   firefox,   flash,   font,   function,   google,   howto,   html,   ie,   internet explorer,   javascript,   jquery,   json,   microsoft,   multi-boot,   operating system,   organization,   os,   page jump,   pci.sys,   quotes,   rss,   seo,   setup,   television,   tri-boot,   validation,   web 2.0,   xhtml,   xml,   xsl,   youtube,  

Subscribe To Feed

loading Subscribers


I'm On Twitter

How To Create CSS Text/Font Gradients With CSS

Something that CSS is currently lacking is the ability to add gradients to our text blocks. Currently we can add drop shadows to text or change the color of it but not add gradients. I suspect that in the coming years this will be a new property but until then here is a method to do it.

HTML Setup

The HTML Setup is pretty simple. Just place an empty SPAN element inside your heading element:

<h3><span></span>Text Here</h3>

Using JQuery to Automatically Insert SPAN Elements

I think a few people might find the above code unsightly, so here's a method to leave the empty SPAN element out of your HTML and inject it via JQuery:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("h3").prepend("<span><\/span>") }); </script>

CSS Setup

The most important part of this code is setting the H3 element's position to relative. I'd also recommend setting the line-height to the same height as the font-size used and also reseting the margins back to zero.

h3 { font-size: 25px; line-height: 25px; margin: 0px; position: relative; } ....Read More >>

Posted By: Neal Grosskopf @ Wednesday, July 01, 2009 8:04:44 PM

Replies: 0 | Views: 36

Tags: css,  ( Add Tag )


Archived Posts:

  • Firefox 3.5 Set To Be Released Tuesday. Here Are Some Exciting New CSS Features In 3.5
    Posted: Sunday, June 28, 2009
    Views: 1533
    Replies: 0
    Tags: No Tags ( Add Tag )
  • YouTube Hacking: How To Retrieve Video Screenshots From YouTube Videos
    Posted: Wednesday, June 10, 2009
    Views: 718
    Replies: 4
    Tags: youtube,  ( Add Tag )
  • Quick & Easy Ways To Spice Up Your Web Site's Font Styling
    Posted: Wednesday, June 03, 2009
    Views: 1370
    Replies: 3
    Tags: css, font,  ( Add Tag )
  • Browser Comparison of Available Print Area Width
    Posted: Tuesday, May 26, 2009
    Views: 768
    Replies: 1
    Tags: browser comparision,  ( Add Tag )
  • Gallery of Yahoo.com's Year Long Home Page Redesign
    Posted: Wednesday, May 13, 2009
    Views: 365
    Replies: 1
    Tags: No Tags ( Add Tag )
  • HTML Vs. BODY Element: What's the Difference?
    Posted: Sunday, May 10, 2009
    Views: 2554
    Replies: 4
    Tags: html,  ( Add Tag )
  • CSS Template Layouts: A Simpler CSS Layout System, Now Possible With JQuery
    Posted: Wednesday, May 06, 2009
    Views: 10714
    Replies: 18
    Tags: css, css3, jquery,  ( Add Tag )
  • Create a JQuery Content Slider Using Pure CSS
    Posted: Wednesday, April 22, 2009
    Views: 4994
    Replies: 6
    Tags: css, css3,  ( Add Tag )
  • My Proposed CSS Property: Intended-Brightness
    Posted: Tuesday, April 14, 2009
    Views: 887
    Replies: 7
    Tags: css,  ( Add Tag )
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next >

Font Size:

  • A
  • A
  • A
  • A

Search:

Places:

  • Blog
  • Message Board
  • Chat Room
  • Geek Speak
  • Open Videos
  • Reviews
  • Tag Cloud
 

Site Links

Site

  • About
  • Contact Me
  • Site Map
  • Site Search

Interact

  • Blog
  • Geek Speak
  • Message Board
  • Open Links
  • Open Videos
  • Photo Gallery
  • Polls
  • Reviews

Random Stuff

  • Hosting by 1&1
  • © Copyright 2005 - 2009
  • Modified: Tuesday, May 26, 2009
  • Load Time: 0.73 Seconds

Site Coded And Designed By Neal Grosskopf Using No Crappy CMS Or Themes