Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
Working on a .Text Skin

I'm trying to put together my own skin to upload to CodeBetter. The way I see it, instead of the massive amounts of CSS hacks you have to put it to make it look nice, why not just create a skin?

So I've learned a fair bit about it all now. I've got .Text 0.95 running at home with a few of my old blog entries in it just to give it some content. Skinning .Text is just a matter of modifying a swag of user controls - you don't touch the code-behind, just the ascx file, which is pretty neat - although, if you decide you don't want a control to be used, you're out of luck - code code-behind is expecting it to be there. So all you need to be able to do is write HTML (which I can do) and make it look pretty (which I can't) all while envisioning the structure of about 20 files in your head at the same time (which I can mostly do :)

It's looking alright so far. I still suck as a designer, but it looks fairly clean and neat - I have a feeling that's it's missing something tho - I just can't decide what. But it works on Firefox perfectly, so there'll be no complaints there, anyway.

Actually, getting it working in Firefox has been no dramas this time around. The main trick is that I was trying to insert some general image placeholders - places where images can be, but the URL of the image is not hard-coded into the skin itself.

This is fairly easy to do in IE - all I did was have something like this in the HTML:

<span class="ImagePlaceHolder1">&nbsp;</span>

And then in the CSS overrides that anyone can do in their blog config, you just put this:

.ImagePlaceHolder1
{
    background-image: url(http://img25.exs.cx/img25/9783/geoff-small.gif);
    background-repeat: no-repeat;
    width: 50px;
    height: 50px;
}

This CSS class puts your custom image as the background image, and increases the size of the tag to which the class is assigned to be large enough to show the entire image (in this case it's 50x50 pixels)

And this didn't work in Firefox. A little head-scratching, a little spitting and swearing, and then a little logical thinking later, I realised all I had to was change the SPAN tag to a DIV. Boom, she works!

So I thought I'd share this little tip with people who want to keep image locations a little loose, but not so dynamic as resorting to script.

If you'd like to get a preview of how the skin is coming, you can see a sneak preview of it here (the image is too large to embed inline, sorry). As I said, it's a work in progress and still not complete, but I'll certainly welcome any constructive feedback :)

Listening to: lake of fire - nirvana - (3:38)
Posted: Saturday, February 05, 2005 8:35 PM by Geoff Appleby
Filed under: ,

Comments

Yex said:

Just a quick thought...If there is information you don't wish to display from an ascx file, you could just wrap all of the code in the ascx file in one big div, and use CSS to set it's visible/display properties to hidden/none. I've done that with .Text skins in the past.
# February 7, 2005 10:28 PM

TrackBack said:

# February 7, 2005 4:08 PM

TrackBack said:

# February 13, 2005 12:46 AM

Ranjan said:

a really good look without bars. Too bad i cant do the same at .netjunkies.
# February 14, 2005 4:13 PM

Geoff Appleby said:

You could, except for the javascript dropdowns :)

Actually...with a little effort you could add the needed javascript to your 'news' section.
# February 14, 2005 4:27 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Geoff's tongue
  • Super Geoff!
  • Searching Geoff
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS