Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Sunday, November 24, 2013

Flexbox justify-content vs align-items

Csak emlekeztetonek, nehogy megint elrontsam:

main axis: justify-content es ennek megfeleloen -webkit-justify-content
cross axis: align-items es ennek megfeleloen webkit-align-items


Friday, February 25, 2011

Monday, November 15, 2010

Sunday, April 20, 2008

CSS Reset

Eric Meyer: The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on.

YUI Reset CSS: The foundational YUI Reset CSS file removes and neutralizes the inconsistent default styling of HTML elements, creating a level playing field across A-grade browsers and providing a sound foundation upon which you can explicitly declare your intentions.

Friday, July 27, 2007

tag soup

Tag soup is HTML code written without regard for the rules of HTML structure and semantics (HTML is the markup language which composes Web pages). Generally, tag soup is created when the author is using HTML for a presentational document rather than a semantic document. Because web browsers have always treated HTML errors leniently, tag soup is also used by browser implementers to refer to all HTML. HTML must be treated by web browsers as tag soup in comparison to XML where errors need not, and should not, be corrected according to the specification.

Tuesday, July 17, 2007

Row Swan: Conflicting Absolute Positions

Ez a problema:

“On two separate occasions this month, I’ve been required to produce a layout in which a fixed-width scrolling side “pane” and flexible scrolling main “pane” must resize to fill all available space in a browser window.”

Vegigjarja a dolgot es vegul Div-ekkel es CSS-sel oldja meg. Persze most is az IE bonyolitja a megoldast.

Saturday, June 30, 2007

Nicholas C. Zakas: dynamically inserting CSS into your page

Itt van az egesz, de a lenyeg:

Safari requires dynamically created <style/> elements to be inserted into the for the rules to be applied

When IE encounters style.appendChild() it throws the rather obtuse and not-very-helpful error message, “unexpected call to method or property access”. Try replacing that with a call to set innerHTML, and you’ll get an equally useless error message of “unknown runtime error”. What’s going on here? It turns out that IE won’t let you manipulate <style/> elements in this way. There is, however, a different way to do the same thing. IE supports a styleSheet property on each style element that allows for the manipulation of the style sheet and the rules contained within. The styleSheet property has a property called cssText, which can be used to set and retrieve the CSS text for the style sheet.

This code now works in all A-grade browsers:

function addCss(cssCode) {
var styleElement = document.createElement(”style”);
styleElement.type = “text/css”;
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = cssCode;
} else {
styleElement.appendChild(document.createTextNode(cssCode));
}
document.getElementsByTagName(”head”)[0].appendChild(styleElement);
}

A warning: IE only allows writing to styleSheet.cssText one time per <style> element. If you try to do it more than one time, it can crash the browser. For this reason, it’s best not to reuse <style> elements on your page. Instead, remove them or just add new ones.

A commentek kozul:

According to the HTML 4.01 spec section 14.2.3, style tags must be contained in the head element: “HTML permits any number of STYLE elements in the HEAD section of a document.”

Link to the spec:
http://www.w3.org/TR/html401/present/styles.html#edef-STYLE