> -----Original Message----- > From: Salman, Khwaja [mailto:[EMAIL PROTECTED] > Sent: Friday, 14 January 2005 7:17 AM > To: [EMAIL PROTECTED] > Subject: [WSG] Two CSS Question > 1) > > I would like ask what is the difference between using <LINK REL> and > @import statement in linking style sheets. > > Both of them atatches the Style sheet to an HTML document, I would > like to know the pros and cons of attaching with link rel or attaching > with @import.
<LINK REL> works in all browsers that support css @import only works in the latest browsers (NN4 and a couple of others ignore it) Which means you have got some possibilities to let browsers such as Netscape ignore all your css if you use the @import rule. Is quite handy sometimes. There are also different media you can import for. E.g. you can specifically import a css just for "print" - so what your printer spits out can look different to what is on the screen. > 2) > Second, in CSS2, is there always a wrapper ID we have to define for > all our elements to hold. In other words we are restricting our selves > to be in the least minimum screen sizes. > > Let me ask in another way. If i am using tables as layouts, > (which I do > not like these days) I use width attribute as 100 %. > > Is there any way to achieve the same funcionality in CSS 2 and with > screen size in-dependence. There are possibilities to set widths to 100% but they are interpreted differently by some of the browsers. In general though: all DIVs take up 100% of the space they have got (unless specified differently). So you can use this behaviour to lay out your page just as you do with tables. In short: css is as flexible with different screen resolutions as are tables. Probably the only exception is the height:100% that you were able to put into tables in some browsers. Replicating that with css is fairly difficult. ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
