PDA

View Full Version : CSS



fenrisx
07-22-2010, 03:14 PM
How I hate thee... Well CSS itself is fine, but the fact every browser thinks it's special and will display things differently I hate.

I've got this homework assignment where the teacher has us dig through his source code & copy/paste a form and the styles for that form into our homework... sounds simple.

I find it easily because it was labeled with comments... I copy/paste... Yet it only looks right in IE for me... and looks like crap in FireFox. Yet, his looks fine in FireFox. So apparently I'm missing something somewhere... he must have rogue styles somewhere that aren't with the rest. Alas it's a pain in the ass. I hate copy/pasting cluttered code into my pages. I would rather have him had us do a simple form ourselves and style it with CSS.

Lee
07-22-2010, 08:48 PM
I learned my lesson with css.

frankly, you have to build websites for ie6 still, especially if you sell things on it.

I rely on tables for more exact placement of text/images, then i use css within td's.

I also still try to keep sites at 1000px for 1024x768 res... unless i make it a flexible width.

hoping things change and mid to large size companies start realizing they should use something better than ie6 (firefox/safari please!)

Lee
07-22-2010, 08:48 PM
i bet i could get your homework to work in all browsers... :D

fenrisx
07-22-2010, 08:54 PM
It's pretty annoying. Example.. the form uses a background image for text fields instead of the regular white box. Well, the images show up in IE, and in FireFox 4 beta, and Chrome, but not in FireFox 3.6.6. The Submit and Reset buttons show up perfect in IE, but in the other three browsers they're on different lines, and on different sides..

If we have to learn all these work arounds to get this working in all browsers, it'd be nice if the teach taught us these work arounds! Otherwise my computers going to be out the window before the night is over!

fenrisx
07-22-2010, 09:02 PM
i bet i could get your homework to work in all browsers... :D


I bet you could too! My experience is pretty limited.. once things get cluttered, I get a headache! That's why I hate that we have to do a lot of 'cut & paste' in this class.

Crinale
07-23-2010, 02:11 AM
fuuun... :thumbup: i dont manually mess with css... then i havent made a website in like 5 years either... <.<

Tanto
08-10-2010, 10:02 AM
So from my understanding you&#39;re supposed to tweak the CSS so that it looks the same in all browsers?

Use the inline declaration for the CSS in the buttons and anything specific that needs tweaked. If you&#39;re having problems getting certain elements to stay on the same line, use style="display: inline;" to keep it from breaking the line. It works for all elements so it comes in handy when you start nesting <div> elements and other things that will break a line unless you use the bit that I put in my last sentence.

Remember the order that a browser parses CSS and that inline declarations overrides the attributes in the header, which overrides any external stylesheets the page may be referring to. So if you can get it looking right with inline declarations, you&#39;re not correctly referring to the styles in the header of the page.

Check out www.w3schools.com (http://www.w3schools.com) they have a very good listing of all the CSS attributes and what browsers support them.