antanova

MOVED: My blog is now at http://antanova.com/blog

IE7 width and min-width bug

After a day of plenty of swearing, I seem to have found something out that I think I should have known about before. I’m posting in the hope it will help out some other hapless web developer and prevent some nasty monitor-forehead interfacing.

For some reason, I know not why, after making a small change to an html page, IE7 stopped picking up some percentage widths (for floated elements). After a lot of swearing, I found out that sometimes, to even pick up a width, IE7 needs both a min-width and width. As I was using percentages that was not a hassle - so for example the rule

float:left; width: 25.5%;

was having no effect: the width of the element was shrinking down to the width of its content, while on IE6, Opera, Safari and Firefox everything was fine. Adding a min-width thus

float:left; width:25.5%; min-width:25.5%;

Sorted everything out. So now everything’s hunky dory. I’m sure most of you will have known about this and I’m quite surprised I haven’t come across it before. That’s part of the joy of the job, I suppose: after the frustration comes the satisfaction of learning something new and solving a problem.

Labels:

Jason posted this on Tuesday, January 29, 2008 at 5:29 pm.
Read comments (15). Leave comment.

Blogmarks button Digg button furl button magnolia button Google Bookmarks button StumbleUpon button Yahoo MyWeb button

A night at the Opera

Firefox has become over the years an indispensable tool for me as a web developer. Firstly, its standards support for css is very good, even if the current stable release doesn’t pass the Acid2 test. The extensions that are available for it are both numerous and useful, none more so than the web developers’ toolbar.

Trouble is, with all those extensions loaded onto it, it becomes one heavy browser. That means that when I’m off duty and just surfing around, I notice things like the pause between clicking the “new tab” icon and being able to type anything in the address bat of the new tab that just opened.

Enter Opera, a fast, light browser that until now had been on my machine just for testing. It’s so quick, sometimes I’ve finished reading a page before I’ve even clicked the link to visit it. And the back button is the fastest I’ve ever seen. Javascript-wise, it’s very quick too, just a tad behind Safari in my experience. Most sites work fine with it, but sometimes I find I have to fire up Safari instead, although that’s surprisingly rare considering its market share and my expectations.

Jason posted this on Sunday, January 27, 2008 at 8:58 pm.
Read comments (88). Leave comment.

Blogmarks button Digg button furl button magnolia button Google Bookmarks button StumbleUpon button Yahoo MyWeb button

May the force be with you

CSS and the Force are not very alike. One of them is a dark art, taking a lifetime to master and needing super-human powers of concentration and persistence, and the other one is the Force.

Sometimes it’s frustrating to be developing a large stylesheet, only to find that part way through for some unknown reason your styles are not being picked up by a particular element. Usually, this is because it is inheriting its style from somewhere else, and it can be a quite a job to go back through the style rules and unpick what is happening.

I’ve just come across a nice little article that explains selector specificity very well, and it’s easy to remember. If you can’t, there’s even a poster you can print out to help you.

Labels:

Jason posted this on Thursday, January 24, 2008 at 5:29 pm.
Read comments (0). Leave comment.

Blogmarks button Digg button furl button magnolia button Google Bookmarks button StumbleUpon button Yahoo MyWeb button

... and?

Right, so left you there a bit didn't I? So, how to get from markdown to html? Well, I don't know how to run Perl, so using the perl on the markdown website. So I cast about for another version, and found a PHP implementation. This works fine: you just need to add a line at the bottom of the file - something like fwrite(STDOUT, Markdown(fread(STDIN, 1048576))). Then it's good to go from the command line.

I kept looking though, and found Pandoc. Now you're talking. This can output your markdown text as html, LaTeX, DocBook, and can do some conversions between those formats, too. It extends markdown with its own custom markdown too, but I think I'll leave that: the whole reason I went down this route was to avoid the all the extra work of tagging, and stick just to the creativity. So that's how I'll write for a little while until I can tell whether it's a method that works for me.

Jason posted this on Tuesday, January 22, 2008 at 11:04 pm.
Read comments (0). Leave comment.

Blogmarks button Digg button furl button magnolia button Google Bookmarks button StumbleUpon button Yahoo MyWeb button

Easier writing

I've always found that tagging blog entries with html a tedious task. I think it's something that should really be taken care of by the editor I use, but I just don't trust it to mark things up exactly how I want them to be marked up. Somehow, thinking about markup and thinking about content are two entirely separate things that interfere with each other far too much.

It's a problem I wasn't going to bother solving; rather I would have just left that particular dog in its basket snoozing, carrying on being slightly put off by the whole blogging process. Thankfully, while looking out for a writers' text editor for my wife to use, the answer came to me. From now on, I'll use Q10 (a full-screen, absolutely minimal text editor) along with Markdown (a 'humane' text markup scheme.)

Let's see how it goes...

Jason posted this on Sunday, January 20, 2008 at 7:44 pm.
Read comments (0). Leave comment.

Blogmarks button Digg button furl button magnolia button Google Bookmarks button StumbleUpon button Yahoo MyWeb button