On 2/10/07, Pierre-Henri Lavigne <[EMAIL PROTECTED]> wrote:
Christian Montoya wrote: > On 2/10/07, Pierre-Henri Lavigne <[EMAIL PROTECTED]> wrote: >> Ok at my work I joined last october they used to work with ie hacks such >> as _ >> >> In their specifications, they are releasing only valid html code and not >> css, and I am trying to release valid css stylesheets too, (Boum) I >> still used tantek hack for example with voice-family. And for various >> reasons, they don't like it. For maintaining they don't want to use ie >> conditional stylesheets for example and want everything in one >> stylesheet. >> >> So everyone think about it, decided to upgrade it progressivly to try >> finding new stuffs. >> >> First initiative came from a colleague who suggest for width and height >> properties : >> width: 980px !important; /* standard loving browser */ >> width: 952px; /* IE5 */ >> width /**/ : /**/ 962px; /* IE6 */ >> >> What do you think about it ? Is it a method already used on the web ? > > Are you putting all the browsers in standards mode with a proper > doctype (HTML 4.01 Strict, XHTML 1.0 Strict)? If you do, you will > probably need less hacks, since the box model will at least be the > same across browsers. As for that hack, I haven't seen that last line > in use before. Yeap I am using a proper doctype each time. We use to work with xhtml 1.0 transitional Last line to my mind is not understable by IE 5 (double css comments ) The primary problem comes from IE6, especially with the ie png filter property. I think without conditional stylesheets, it would not be possible to get a valid css :(
XHTML 1.0 Transitional, AFAIK, puts IE into quirks mode. If you have anything above the doctype, that also puts IE into quirks mode. With IE in quirks mode, it's no surprise that you would have to add all these hacks to get around the different box models. I'm just saying that you might be able to avoid so many hacks if you can at least get all the browsers to render in standards mode... I do that with all the webpages I create and I never have to specify different widths for different browsers. Anyway, I understand that you aren't the person in charge here so it might not be in your power to change the doctype on all the pages published, but you can at least work around the issue with quirks mode by not defining border, padding and width/height on elements... put the width/height on an outer element and then have another element right inside that has padding & border, rather than a single element with all three properties. -- -- Christian Montoya ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************
