.Net Code Monkey RSS 2.0
 Thursday, May 27, 2010

Glass Effect Text without images (HTML and CSS only)

As part of the development for a new web site I am working on I ideally need the site header text to be a glass effect laid over the glass effect headr image. I also want the header text to be able to be 'read' by search engines.

Although many search engines can read the 'alt' text of an image I belive I am right in saying the major search engines put more emphasis or weight on plain text. Especially text in header tags H!, H2 etc.

With this in mind I wanted to create a text only header that also has a glass effect.

One option was to create a text header and then over lay half of the text with a semi trans parent PNG. This will work visually but will not allow the text to be selected properly.

So to allow the text to be selected I decided I needed to place one layer of text on top of another and then cut off the bottom of the top layer of text.

Below is the code I used.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head >
</title>
<style type="text/css">
div.Glass
{
background-color:#FFF;
background-image:url(http://michaelsync.net/wp-content/uploads/2008/06/silverlight-glass-button.jpg);
background-position:-22px -10px;
background-repeat:no-repeat;
border:solid 1px #FFF;
height:80px;
position:relative;
}
div.Text
{
color:#66F;
height:80px;
}
div.Shine
{
color:#99F;
height:39px;
overflow:hidden;
margin-top:-97px;
}
h1
{
margin-top:17px;
}

/* IE7 Specific CSS hack */
* + html div.Shine
{
margin-top:-80px;
}
</style>
</head>
<body>
<form id="form1" >
<div class="Glass">
<div class="Text">
<h1>Welcome</h1></div>
<div class="Shine">
<h1>Welcome</h1></div> </div> </form> </body> </html>

Thursday, May 27, 2010 12:17:21 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Asp.Net | CSS | Html
 Tuesday, April 06, 2010

Since Christmas I have been filling some fo my spare time working on a website for a game for family and friends that my girlfriend's family play. This has now been released and can be seen. here:

The Coconut Of Incontinence

The site is written in Asp.Net 2.0

Tuesday, April 06, 2010 12:36:23 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.Net | Coconut Of Incontinece
 Thursday, March 25, 2010

Call of Duty Modern Warfare 2 vs Battlefield Bad Company 2

I have recently purchased both games and will use this space to write a little review of how I feel they stack up against each other.

Single Player Capaign Mode

MW2

Good
- A good plot which keeps you interested

Bad
- The capaign game was over far too soon. It could have done with a bit longer. I expect hardcore out of work players or children in holidays would complete on the day of purchase.

BC2

Good
- almost fully destructable landscape. Alot of buldings can be destroyed, however not all.
Bad
- Plot seems weak so far as I haven't completed it yet
- Far too many cut scenes. sometimes you have only just run a hundred yards and oops, here we go.. another cut scene. It breaks up the gaming flow far too much.

Multiplayer Online

MW2

- Selectable perks allow you to tweak the "skills" of your soldier to suit your needs.

BC2

Good - i'm loving the Recon class's calling in of mortars. very useful tool. Bad - I found the basic guns difficult to get on with. - Medics can't Heal or revive until they learned their skills!

General

MW2

BC2

Good
- Landscapes are wide and open
- Bullets drop over distance


Bad
- Too much swearing. There is a lot of pointless swearing in the whole game, multiplayer and single player. This is not by other players but by the Non Player Characters. I wouldn't want any of my children under 13 playing the game.
-PC version crashes quite a lot.

To be continued... I will add more as I go along.

Please feel free to comment!

Thursday, March 25, 2010 1:29:21 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
Battlefield bad Company 2 | Modern Warfare | PC Gaming
 Friday, May 01, 2009

In the Budget on April 22nd the Government announced plans to introduce a Car Scrappage scheme in the UK, starting from
May 18th 2009.

Under the terms of the Scrappage scheme, the Government fund a discount of £2,000 off the purchase price of a new car or van for customers who trade in cars that they have owned for at least twelve months and are at least 10 years old.

Do the rich politicians actually know why people like myself own and drive around in 10 year old plus bangers bought for about £500? Not because we prefer driving one to a nice shiney new car, but because we can't afford to go and buy a new car. I'm sure many who drive round in old bangers like me, can't even afford to buy a car of £2000, let alone buy one for £10K with £2K knocked off if they have it scrapped at the same time. Does the government live in a dream world? Do these rich fat cats realise how much disposable income most of us DO NOT actually have? Clearly not.

What is more, in these days of recycling and the urge not to be wasteful of resources, surely it is better to try and keep using an object, that cost thousands of pounds to produce and countless irrreplacable resources to produce, for as long as possible. Not replace it with a brand new object that cost even more thousands and more of the planet's resources?

Am I right, or have I missed the point completely?

Friday, May 01, 2009 5:43:58 AM (GMT Standard Time, UTC+00:00)  #    Comments [1] -

Archive
<May 2010>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
Blogroll
 Clemens Vasters
 Harry Pierson
Passion * Technology * Ruthless Competence
 Joshua Flanagan
A .NET Software Developer
 Michael Schwarz's Blog
Developing applications on the Microsoft platform since Windows 3.1!
 Omar Shahine
Yet another Microsoft blogger
 Scot GU
Scott Guthrie lives in Seattle and builds a few products for Microsoft
 Scott Hanselman
Programming Life and the Zen of Computers
 Tom Mertens
Tom's corner
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Duane Wingett
Sign In
Statistics
Total Posts: 39
This Year: 4
This Month: 0
This Week: 0
Comments: 39
Themes
Pick a theme:
All Content © 2012, Duane Wingett
DasBlog theme 'Business' created by Christoph De Baene (delarou)