foolfillment: the blog


css style sheets tips

6:31 pm on the 13th of November, 2002

as part of my application software module i have to design a website from scratch, including all the usual gubbins (tables, lists, links, images etc…) as well as bewing linked to my css style sheet.
i want to have a thing in my style sheet that’ll change certain words when they get typed, for example changing the font type, font size/decoration/background etc. i don’t know if this can be done, one use i want it for is to change words into links automatically, because i think it’d be dead usefull for this site as there are a few things i link to regularly.

a while ago i tried something that was supposed to work with movable type but it didn’t, this would be better anyway as it would be totally useable on any site.
does any one have any ideas as to how i can do this? or better ideas?

Comments

  1. littleboy

    You could certainly set up sopmething with PHP. Maybe an external file with an array of your most used URLs which you could call from your posts. Along the lines:

    The script would then echo the link code with the appropriate URL included.

    You could probably do exactly the same thing with a bit of JavaScript.

    Although that may be as much work as actually typing out the link each time.

    Greymatter comes with a one click linking thing (bookmarklets?) which may well be available with Movable Type. I haven’t used it myself so I don’t really know if it’s any use.

    As for the CSS. You can set up your own classes of existing tags. However you would need to include the tag around any words you wanted to change.

  2. littleboy

    Sorry along the lines

    include linkThing.php?link=google

  3. SM

    hmm, i can’t use any php right now unless i change server because it isn’t supported. that’s why i had to use movable type instead of greymatter. i don’t now anything about php at the moment anyway, it’s something i keep meaning to do a few tutorials on.

    if it’s possible to do it with javascript then it could be worth doing, but only if it makes it quicker.

    and if it’s not possible for css to convert words automatically then there’s no point in me trying. i’m only trying to earn a few extra points in this block before i have to try to use MS access…

    I might have to go back the support forum for MT, there was something available that’d do loads of fancy stuff but it didn’t work when i tried it. never found out why. I can’t make any changes like that at the moment now anyway because i can’t use any ftp packages over the uni network.

  4. imran

    Hi

    The power of CSS is amazing. I?ve seen a few sites like this one where i?ve been blown away by what you can do. Alot of DHTML and other funkiness can be avoided if your clever with your stylesheet.

    I want to manage a stick up footer on the website for IE 5.0 +. with CSS As you can see 1 on bmw.co.uk

    thanks

    Imran

  5. Trackbacks/Pings

      Leave a Reply

      Add a link to your comment