I often use CSS shorthand on my coding, and I found the following article extremely useful. For anyone who’s familiar with CSS, this could be very helpful.
There have been a number of occasions when looking over other developer’s CSS I notice bits of code similar to the following…
#div {
margin-top: 20px;
margin-bottom: 10px;
margin-right: 5px;
margin-left: 25px;
padding-top: 10px;
padding-bottom: 15px;
border-width: 1px;
border-style: solid;
border-color: #666666;
font-family: Verdana, Helvetica, Arial;
font-size: 14px;
font-weight: bold;
}The above code is littered with properties that could easily be combined for more legible code and decreased file size. Some properties might even be removed altogether since they default to the desired value. Below you will find before and after examples of some of the most useful CSS shorthand properties. As a general rule any browser later than IE5 should support all of these.
Posted on 17 Aug 2011, with 40 notes
-
jeunex likes this
-
utopes likes this
-
swordsofjustice reblogged this from koukyun
-
ireneri likes this
-
koukyun reblogged this from madarathemes
-
fenjun reblogged this from fukuo
-
thematchgirl reblogged this from ettudis
-
aihiki reblogged this from fukuo
-
oz-b-rabbitius likes this
-
hiidora likes this
-
pencilsaurus reblogged this from striderstier
-
littlebell02 reblogged this from madarathemes
-
littlebell02 likes this
-
mydearsourwolf likes this
-
the-blank-canvas reblogged this from madarathemes
-
madarathemes likes this
-
madarathemes reblogged this from fukuo
-
zojoh likes this
-
bellremade likes this
-
community-cervix likes this
-
phantomearl reblogged this from fukuo
-
phantomhiveearl likes this
-
striderstier reblogged this from fukuo
-
itachiswag likes this
-
fukuo reblogged this from ettudis
-
vaniccio likes this
-
ettudis posted this
