SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot ComputerBob's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Where do you put your CSS properties ?

    Can someone explain why some authors use @import to import external stylesheets into Web pages. I think it has something to do with non-CSS browsers. Does @import force the browser to import the external stylesheet each time a new Web page is displayed, or is the imported stylesheet still cached like an external one?
    ComputerBob - Making Geek-Speak Chic™
    http://www.computerbob.com
    - XHTML 1.0 Strict + CSS Layout
    Ratings | Forums | Software | Polls | Weird | Quotes | Weather
    Guest Articles | Free Greeting Cards | CB Awards | Search

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ComputerBob
    Can someone explain why some authors use @import to import external stylesheets into Web pages. I think it has something to do with non-CSS browsers. Does @import force the browser to import the external stylesheet each time a new Web page is displayed, or is the imported stylesheet still cached like an external one?
    The @import rule is mainly used by today's designers to hide content that isn't friendly to older browsers that understand some CSS, like Netscape 4. You can put NS4-friendly styles in a <link>ed stylesheet, and use @import for advanced styles (i.e. margins, padding, borders, CSS2 stuff). This will give you a page that looks a little better than basic content in older browsers, but newer browsers will see a vastly different layout usually.

    And yes, the stylesheet gets cached with @import, so you don't have to keep downloading the stylesheet, unlike if you put your styles directly into your documents.

  3. #3
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit:

    split from the other thread
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •