Création des Logiciels de gestion d'Entreprise, Création et référencement des sites web, Réseaux et Maintenance, Conception
Création des Logiciels de gestion d'Entreprise, Création et référencement des sites web, Réseaux et Maintenance, Conception
Links for www.google.com | External links | Internal links |
Previously categorized as... | www.example.com/ www.example.org/stuff.html scholar.google.com/ sketchup.google.com/ google.com/ | www.google.com/ www.google.com/stuff.html www.google.com/support/webmasters/ |
Now categorized as... | www.example.com/ www.example.org/stuff.html | scholar.google.com/ sketchup.google.com/ google.com/ www.google.com/ www.google.com/stuff.html www.google.com/support/webmasters/ |
@lang
and @dir
, at least on the html
element:<html lang="ar" dir="rtl">
direction
or unicode-bidi
. (For XML, the situation changes again. XML doesn’t offer special internationalization markup, so here it’s advisable to use CSS.)<link href="default.rtl.css" rel="stylesheet">
<link href="default.css" rel="stylesheet">
[dir='rtl']
attribute selector[dir='rtl']
.aside {
float: right;
margin: 0 0 1em 1em;
}
[dir='rtl'] aside {
float: left;
margin: 0 1em 1em 0;
}
:lang()
pseudo class:lang()
pseudo class. (Note that we’re talking documents here, not text snippets, as targeting snippets of a particular language makes things a little more complex.):lang(zh) strong,
:lang(zh) b {
font-weight: normal;
color: #900;
}
float
, or text-align
.text-align: left
in LTR needs to be text-align: right
in RTL.box-shadow
and text-shadow values
, and JavaScript positioning and animations: These may require being swapped and accommodated for in the opposite directionality.[dir='rtl']
(or [dir='ltr']
) hook (tip #2), you’re using a selector of higher specificity. This can lead to issues. Just have an eye out, and adjust accordingly.width
for container elements, we started using max-width
instead. In place of height
we used min-height
, so larger fonts or multi-line text don’t break the container’s boundaries. To prevent fixed width images “propping open” liquid columns, we apply the following CSS rule:img {
max-width: 100%;
}
<meta name="viewport" content="width=device-width, initial-scale=1">
device-width
in the region of 320px. If your mobile device actually has a width of 640 physical pixels, then a 320px wide image would be sized to the full width of the screen, using double the number of pixels in the process. This is also the reason why text looks so much crisper on the small screen – double the pixel density as compared to a standard desktop monitor. width
to device-width
in the viewport meta tag is that it updates when the user changes the orientation of their smartphone or tablet. Combining this with media queries allows you to tweak the layout as the user rotates their device:
@media screen and (min-width:480px) and (max-width:800px) {
/* Target landscape smartphones, portrait tablets, narrow desktops
*/
}
@media screen and (max-width:479px) {
/* Target portrait smartphones */
}
orientation
media query to target specific orientations without referencing pixel dimensions, where supported.
@media all and (orientation: landscape) {
/* Target device in landscape mode */
}
@media all and (orientation: portrait) {
/* Target device in portrait mode */
}
@media screen and (max-width: 800px) {
/* specific CSS */
}
@media screen and (max-width: 479px) {
/* specific CSS */
}
Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13
Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Nexus One Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>http://example.com/foo.html</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
<video:video>
<video:content_loc>http://example.com/videoABC.flv</video:content_loc>
<video:title>Grilling tofu for summer</video:title>
</video:video>
</url>
</urlset>