10 Replies - 3410 Views - Last Post: 15 February 2012 - 11:29 AM

Can't get last-child to work with styling forms in CSS

Posted 13 February 2012 - 08:36 PM

I am having some problems with styling my form. I need 3 input boxes for the date. The first 2 are the same size and the last one is a little bigger (for the year). I have been messing around with last-child but i can't get it to work.

Re: Can't get last-child to work with styling forms in CSS

Posted 15 February 2012 - 04:40 AM

revolutionx, on 15 February 2012 - 11:36 AM, said:

Also, your break tags are wrong, they should be: <br />

nope, they’re not wrong. self-closing tags are only required in XHTML served as "application/xhtml+xml". HTML 4 explicitly forbids it and HTML5 allows it. though no browser will complain unless you’re in XML mode.

Re: Can't get last-child to work with styling forms in CSS

Re: Can't get last-child to work with styling forms in CSS

Posted 15 February 2012 - 08:52 AM

I got it to work adding in a second ID but i don't think this would help me if i was going to actually make this form do anything. But i need to submit this code tonight so im submitting this so far. I still would like to figure it out though for future use.