×
Clear all filters including search bar
Valeri Tandilashvili's CSS Notes
:after
, :before
, :first-letter
, :first-line
, introduced in CSS2border-spacing
propertytable {
border-collapse:separate;
border-spacing:0 15px;
}
Another way is to put additional separator TRs <tr class="separator" />
between rows.separator {
height: 10px;
}
Third way is to use margin-bottom
propertytr {
display: block;
margin-bottom: 15px;
}
<?php
if(stristr($_SERVER['HTTP_USER_AGENT'], "Mobile")){ // if mobile browser
?>
<link rel="stylesheet" href="style-400.css" type="text/css" />
<?php
} else { // desktop browser
?>
<link rel="stylesheet" href="style.css" type="text/css" />
<?php
}
?>
<link href="css/d1.m.min.css?t=2.9" rel="stylesheet" media="screen and (max-width: 500px)" type="text/css" />
Another way is to use handheld
on media
attribute<link rel="stylesheet" type="text/css" href="mobile.css" media="handheld"/>
PHP's way to load CSS file for mobile
devicesif(stristr($_SERVER['HTTP_USER_AGENT'], "Mobile")){
echo '<link rel="stylesheet" href="style-400.css" type="text/css" />';
}
Load CSS resource only for desktop<link href="css/d1.min.css?t=2.9" rel="stylesheet" media="screen and (min-width: 501px)" type="text/css" />
Another way is to use screen
on media
attribute<link rel="stylesheet" type="text/css" href="screen.css" media="screen"/>
Using PHPif(!stristr($_SERVER['HTTP_USER_AGENT'], "Mobile")){
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
}
Note: Remember this always loads the d1.m.min.css
but activates it only on screens having max width as 500px
em
because if we have 3 containers nested inside of each other with 2em
, then the child element will have 8 times more font-size than it's grand parent container (it means they cascade) https://www.w3schools.com/cssref/tryit.asp?filename=trycss_unit_em
https://youtu.be/-GR52czEd-0?t=279h1 {
height: 500px;
height: 100vh;
}
h1 { font-family: Arial, Helvetica, sans-serif; }
The font-family
property should hold several font names as a "fallback" system, to ensure maximum compatibility between browsers/operating systems.
If the browser does not support the first font, it tries the next font.
Start with the font you want, and end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are availablesource
code4123
new code line
one more line1h