I'm pretty new to web development. Being a tech, I have found the whole scripting and SQL side natural to pick up. However, the markup does my nut. Why do you hear so much noise on forums about having to adhere to standards. I remembered someone saying to me 'Dude, table based layouts make baby Jesus cry'. (This was during a work placement - I go to York doing CompSci) He offered to recode the whole thing in the correct standard for me. I said, 'If your manager will sign off the work package, be my guest!' He never got back to me on that one. So I investigated what was wrong with table tags and it seems everyone is using divs these days. More specifically display:table styled div. However, IE doesn't support these and you need to float them to get them to align next to one another in a row. However, this doesn't work in Firefox because Firefox say floats have no height and the conatining table div doesn't stretch. You can use an if IE conditional statement to swap a stylesheet, but this in itself isn't standard. WTF! As I said I'm new to this, if there's a way round this, I'd love to hear it.
tables are an anachronism in html.
They're layout elements in a language that's moving away from layout to content, with the layout being provided by CSS styles.
They've also been heavily abused over the ages by people who didn't know what the heck they were doing but called themselves web designers because they could click something together in Frontpage or Dreamweaver that looks nice when presented on its own to a marketing manager.
As a result many people who actually have to maintain websites look to any use of tables with distrust, any use by inexperienced people who've not proven they know how to properly use them with extreme suspicion.
The guy made the correct decision to not hire you if you call yourself a web designer/developer yet aren't able to use current technology to do the job.
You can (and I have) lay out just about anything without the use of tables in IE.
Due to incompatibilities in Firefox and other browsers it's slightly harder to make something browser agnostic, but as a professional you should be able to do that easily too. It's your job, don't complain about it.
"The guy made the correct decision to not hire you if you call yourself a web designer/developer yet aren't able to use current technology to do the job."
What guy? Not hire me for what? What are you going on about?
"Due to incompatibilities in Firefox and other browsers it's slightly harder to make something browser agnostic, but as a professional you should be able to do that easily too."
I explained that I investigated how to create a table equivalent with divs and discovered one method that works in IE and one method that works in Firefox but not one that works well for both. However, in terms of making it browser agnostic, I explained I couldn't and had to use frowned up conditional comments. Any help on that one?
I wasn't complaining as such, just making fun of the fact you sometimes have to break one standard in order to meet a different standard. (Unless you know a way round the whole floats have no height in Firefox, IE doesn't use display:table paradox and I am making a spectacular tit of myself)
Serve this up and look in both browsers.
<p>Works in Firefox</p>
<div style="display:table;width:100px; border:1px solid black;">
<div style="display:table-cell; border:1px solid black;">Cell 1</div>
<div style="display:table-cell; border:1px solid black;">Cell 2</div>
<p>Works in IE</p>
<div style="width:100px; border:1px solid black;">
<div style="width:49px; float:left; border:1px solid black;">Cell 1</div>
<div style="width:49px; float:left; border:1px solid black;">Cell 2</div>
Can you produce a piece of code that has the desired effect that works in both. I'll call you more that a professional, I'll call you a freekin' legend if you can!
What version of IE are you using?
Google webtoolkit will be able to provide most if not all of the tools to help you get around this.
Looked it up. Seems pretty cool. I guess under that framework your approach is more rational unified than agile. I guess it works better for those large projects that needs a team and has many specific requirements over the usual, meh need a forum, meh need a shopping cart, I'll get back to you in a week or two kinda stuff. I think that's the kinda thing I'll get into during work rather than the 'interactive documents' I make for friends and family in my free time. I'll probably give it a miss for now, but thanks for the advice.
However, isn't the end product still html. I mean won't a border in Firefox still get drawn round the outside edge and in IE get drawn round the inside edge. If a customer wants a box that is exactly 100px wide on all browsers you still need to check for the clients agent (I think that's the correct term), which is possible to hide at the user side and therefore bad practise? I really think that there are condtradictions in the ever changing standards of the wacky world of web development and I think it's funny. Try to validate www.google.com. It doesn't. If they made $25bn without making it perfect then good for them.
Also, all those who think they can hack into the pentagon with a piece of copper wire and a lemon because they've developed a 'professional lexicon' over the years, please pull your head out your ass and realise there are very intellegent students out there who can be trusted to draw a box.
Yeah you should try IE7 im pretty sure it has the proper requirements for the div tags
I don't understand the fuss about "omg tables will kill you in the middle of hte night" either, but whatever. If they work, they work. It's probably a lot easier to code a WYSIWYG editor that uses tables rather than one using divs, too, so a lot of those will probably tend towards tables. Both tables and divs can be a pain, and both can help make a job easier. And when the benefit is bragging rights and the cost is developer time, I'd guess most employers will vote for the quicker one...