Friday 23 January 2009

rounded/custom borders

This morning I played around with the Raphael javascript library, trying to create a rounded corners background for a div.

There were a few problems though:
  • IE8 didn't work. I tried replacing
    document.namespaces.add('rvml','urn:schemas-microsoft-com:vml');
    document.createStyleSheet().addRule('vml\\:*', 'behavior:url(#default#VML)');

    with
    document.namespaces.add("rvml","urn:schemas-microsoft-com:vml","#default#VML");
    but it that made it break in all IEs, I don't know why though.
  • When I set the size of the svg/vml to a percentage value, it broke in IE.
  • The webkit browsers (Safari, Chrome) resize the svg when you increase/decrease the text size


So I gave up on svg/vml.

Before lunch I played on Animal for a bit and saw Pascal! It's the first thyme I've seen him. I also thought that I had enough money to pay off my mortgage, but then the mortgage was nearly 600,000 bells, when I thought it was about 500,000 bells. So I guess Nook must charge interest on your mortgage. I'd been keeping all my money in my bank account rather than paying off the mortgage since I thought that way I'd earn interest on the money saved until I had enough to pay Nook. But it seems like that was a bad idea and I would have been better just paying off the mortgage as I went along. Never mind, another week or so and I should have made another 100,000 bells.

After lunch I looked into other methods of getting rounded/custom corners and borders. In terms of rounded corners, you can use the css attributes -moz-border-radius and -webkit-border-radius for round corners in Firefox and webkit based browsers. You can also use an SVG for a background in Opera: Example showing -moz-border-radius, -webkit-border-radius and an SVG background for rounded corners in Firefox, Safari, Chrome and Opera.

The best solution I found though, was Cross Browser Transparent custom corners and borders - version 2, from 456 Berea Street.

After dinner I watched The Adventures of Baron Munchausen with Ben and Mac, then watched some Loituma videos and joined a japanese video sharing website, which has writing across the videos all the time. I don't know why though, since I don't know Japanese.

The weather today was very windy. In the morning it was raining, then this turned to snow mid morning. By lunchtime it had stopped snowing/sleeting and was just overcast. Later in the afternoon the clouds cleared, and there was quite a nice sunset.

Food
Breakfast: Orange marmalade toast sandwich; cup o' tea.
Lunch: 2x Cheese on toasts; apple; chocolate digestive biscuit bar; cup o' tea.
Dinner: 2x fish cakes; peas; mashed potato; tomato ketchup. Pudding was strawberry whip with sliced Kiwi fruit and squirty cream. Coffee; Cadbury's Dairy Milk Turkish; Chocolate Coin.
Supper: Milk chocolate digestive; German biscuit; cup o' tea.

No comments: