Posts Tagged ‘CSS’

IE7 fieldset input position bug

// December 1st, 2006 // No Comments » // HTML/CSS, Web Development

Whilst developing some view related material for a new project I’ve been working on I came across this rather puzzling that affects various types of input fields in Internet Explorer 7 (I haven’t checked to see if it occurs in lower versions of IE):

Basically, when an input tag is surrounded by a fieldset tag which is surrounded by a containing tag such as a div with a left margin, the input tag inherits the margin defined in the containing div. Here’s an example of what I mean:

(div style=”border: #ccc 1px solid”)
(div style=”margin: 50px; border: blue 1px solid”)       Container with 50px margin
(fieldset)
(legend)Fieldset(/legend)
(input type=”file” /)
(input type=”checkbox” value=”on” /) Checkbox is not affected
(/fieldset)
(/div)
(div)

If you try this in IE you’ll see that the file input box inherits the 50px margin. Very odd indeed!

Anyway, after a quick browse on the web I found the solution (and the cause of the problem):

Simply surround your input fields with a containing div (don’t use a p tag if it’s within a form tag as it will break page validation) and set the margin of that div to 0.

New website for jcarroll.org.uk

// July 31st, 2006 // No Comments » // Web Development

Well, this is a new frontier for my business and I – it’s my first post to my first ever blog AND the main website has just had a face-lift. Times are a changing I tell ‘ya.

It’s an odd feeling, this blogging business, especially when you know few (or no) people are even reading the thing. Still, we all know the importance of a blog these days so here I am writing my first post.

Anyway, the new website has had a whole host of changes and improvements, most notably the overall look-and-feel, which has been left wanting for quite some time now. There’s a great deal more information available the services the business provides and its past clients – mostly folk like myself, struggling to make a little place for themselves in the world. If I were to be honest (which I am… always… honest), there are a great deal more pages making space for new information, with that information neatly printed in my head. I really must set some time aside so that I finish the damn thing!

OK, that’s enough for now. I don’t want to overdo it on my first post…