Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Hidden" CSS file works only for FF, Opera

Tags:

My friend sent me a link to this little page which shows a simple HTML+CSS layed out page. However, if you look at the source code, you'll notice there's no link to the css file.

If you're using ff with firebug, you can see that under NET, the css file is linked through a sent header (just wanted to show y'all that).

My question is, do you have any assumption to as why this doesn't work with safari, ie? I assume that headers are not browser-dependent. What gives?

like image 785
Gal Avatar asked Feb 05 '10 23:02

Gal


People also ask

How do you hide content in CSS?

You can hide an element in CSS using the CSS properties display: none or visibility: hidden . display: none removes the entire element from the page and mat affect the layout of the page. visibility: hidden hides the element while keeping the space the same.

Do browsers load hidden images?

So why do browsers load images even when they're hidden? Simply explained: The browsers parses HTML first and as it encounters external resources it will start requesting them.

How do you hide styles in HTML?

To hide an element, set the style display property to “none”. document. getElementById("element"). style.

How do I make an image overflow hidden?

To activate the overflow property enclose the image, within a div of a particular width and height, and set overflow:hidden . This will ensure that the base container will retain its structure, and any image overflow will be hidden behind the container.


1 Answers

You may find this a useful resource: http://www.w3.org/TR/html4/present/styles.html#h-14.6

Not sure why it doesn't work in Safari/Chrome (Webkit) but it could be because of this:

This section only applies to user agents conforming to versions of HTTP that define a Link header field. Note that HTTP 1.1 as defined by [RFC2616] does not include a Link header field (refer to section 19.6.3).

like image 101
Brad Avatar answered Oct 14 '22 21:10

Brad