May 4
i have to type this entry in lowercase because my keyboard is acting up again
in my quest to convert my site to pure css, i’ve been working a lot with styled fieldsets using a great tutorial found here. i stumbled upon a bug that’s been bothering me for days. the textarea and submit button inside of my fieldsets keep getting shoved over in ie, causing the entire layout to collapse. the other form elements, however, are not affected.
here’s what it’s supposed to look like (firefox)
here’s what it looks like in ie
after tweaking the stylesheet a bit, i discovered that the textarea/button nested inside the fieldset was inheriting all other specified left-margins in ie. here’s an example of what i mean:

the code:
<div class="cont1">
.cont1
<div class="cont2">
.cont2
<fieldset>
<textarea cols="10" rows="5"></textarea><br />
<input type="button" value="Button" />
</fieldset>
</div>
</div>
the css:
.cont1 {
background: blue;
margin: 0 0 0 10px;
padding: 5px;
}
.cont2 {
background: yellow;
margin: 0 0 0 15px;
padding: 5px;
}
fieldset {
margin: 0;
padding: 0;
}
fieldset textarea {
margin: 0;
padding: 0;
}
the textarea and input button are shoved to the right by 25 pixels (the left margin of cont1 + the left margin of cont2). i haven’t had time to do thorough research, but as far as i know, there is no workaround for this bug. i did find someone else who had the same problem, however. someone suggested in the comments to enclose the elements in an arbitrary div, and that seemed to work for me.

new code (same stylesheet):
<div class="cont1">
.cont1
<div class="cont2">
.cont2
<fieldset>
<div class="arbitrary">
<textarea cols="10" rows="5"></textarea><br />
<input type="button" value="Button" />
</div>
</fieldset>
</div>
</div>
the arbitrary div idea is fine for now, but i’d like to find another way to remedy this bug. has anyone else had this problem? if so, how did you fix it?
this is the last week of the semester! hopefully i’ll be back to blogging regularly by next week 
Samantha (Quote)
Hi bubblessoc, hope you reply to me soon
Wed May 4th, 2005 8:19 am
natasja (Quote)
First of all I hate IE
Secondly, this might have to do with the box model, but I’m not sure, since you didn’t work with fixed sizes.
You can make a different rule for IE in the CSS (after the .cont2 style) like this:
*html .cont2 {
margin: 0px;
}
Hope this works?
Thu May 5th, 2005 3:40 am
tuan (Quote)
you make css sound so complex o.O
Thu May 5th, 2005 6:02 am
Bubs (Quote)
hmm, i tried the *html rule… it worked for ie, but gave me a css validation error
are there any other ie-only rules? thanks for that one, btw
Fri May 6th, 2005 12:01 am
Dayna (Quote)
Hmm.. yea.. that looks complicated…
at least for me..
Hope you get it fixed soon
Fri May 6th, 2005 10:40 am
Brigitte (Quote)
Your superfly ability to code makes me smile. Thanks for all your help with my blog, by the way. It looks much better now! *hugs*
Fri May 6th, 2005 6:30 pm
Yvonne (Quote)
Lol, I’m sure i could understand the contents of your post but at this point in time, it just looks like a whole new language to me. X_X
Tue May 10th, 2005 11:15 pm
Jenny (Quote)
css is hard. hey… no more gravatars? aw… and i just got a new one too.
Wed May 11th, 2005 3:20 pm
Bubs (Quote)
They’ll be back sometime
Wed May 11th, 2005 5:03 pm
Jenny (Quote)
wee!
Thu May 12th, 2005 12:28 am
Ryan (Quote)
Your site is always so pretty. I love it. CSS rules.
Thu May 12th, 2005 12:45 pm
shirley (Quote)
Wow.. to me.. coding everything in css sounds like the impossible XD haha… it’ll probably take me ages.. but you’re more advance then I am ^^ Good luck!
Sun May 15th, 2005 1:28 am
Yajaira (Quote)
Woah…I’m BARELY getting into the “css layout” thing and man, that looks complicated LOL. Good luck with your coding!
Mon May 16th, 2005 10:34 am
Aneesah (Quote)
Yeah, I’ve seen tutorials on customising forms via CSS, it’s so neat, isn’t it? I haven’t tried anything myself, though. ‘Cause I’ll always find something wrong and then not being able to solve it and then giving up. ^^;
They should make IE disappear someday.
Fri May 20th, 2005 5:58 am
Marie (Quote)
hey! love the new layout Bubs!
Fri May 20th, 2005 7:18 pm
jr (Quote)
hope the keyboard works better
Sun May 22nd, 2005 12:29 am
manda (Quote)
BLERGH! IE! It annoys me more and more…
I loooove this new look. Fruit are cool, and they’re so cute! My keyboard screwed up big time once, and I couldn’t be bothered to fix up all the typos that happened so everyone thought I was drunk lol
Mon May 23rd, 2005 1:47 am
Lauren (Quote)
IE doesn’t understand the !important; declaration, so you can do something like this for .cont2:
margin: 0 0 0 15px!important;margin: 0;
Mon May 30th, 2005 10:50 am
Bubbila (Quote)
Sweet resource, just what I have been looking for.
Thu Mar 27th, 2008 3:09 pm