| Web Standards Design Discuss accessibility, CSS, XHTML and more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Excelling Contributor
Joined in Oct 2004
Hosted on pass61/63
622 posts
Gave thanks: 8
Thanked 2 times
|
Combine or No?
is it better to combine CSS properties like padding:5px 10px 10px 5px
or is it better to separate each one? i never combine just to make it easier find and change values and what not. i've seen a lot going both ways. but what's the norm? |
|
|
|
|
|
#3 (permalink) |
|
Surpass Fan
Seasoned Poster
Joined in Feb 2007
Lives in Maine
Hosted on SH110
40 posts
Gave thanks: 3
Thanked 3 times
|
I think it's a combination of personal preference and byte pinching. I assume less lines and characters equals smaller file size, especially when working with a large CSS file.
|
|
|
|
|
|
#4 (permalink) |
|
Searcher
Surpass Staff
Joined in May 2003
Lives in Orlando
24,699 posts
Gave thanks: 943
Thanked 806 times
|
Oooh, smaller file size "for the win" please.
__________________
Follow Surpass on Twitter and Facebook
Check out interesting finds on the Surpass Blog .... it's coming. |
|
|
|
|
|
#5 (permalink) |
|
Registered User
Super #1
Joined in Mar 2005
Lives in Washougal, WA
1,306 posts
Gave thanks: 23
Thanked 39 times
|
I do this...
padding: 5px 10px 10px 20px; margin: 0 10px 20px 10px; Just to make the style.css smaller in size or with less clutter. 1st one is top, 3rd is bottom, 2nd is left, 4th is right. Last edited by wgm; April 4th, 2007 at 9:26 PM. |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Super #1
Joined in Mar 2005
Lives in Washougal, WA
1,306 posts
Gave thanks: 23
Thanked 39 times
|
Mykal thats how its done with the editor I use.
Edit: nevermind, your right, I've been up since 3:30am PST, just tested and I am too tired for this stuff. Last edited by wgm; April 4th, 2007 at 10:00 PM. |
|
|
|
|
|
#8 (permalink) |
|
Surpass Fan
Seasoned Poster
Joined in Feb 2007
Lives in Maine
Hosted on SH110
40 posts
Gave thanks: 3
Thanked 3 times
|
Which is fine, however it does not change the underlying code that is created using the editor. Just out of curiosity, which editor do you use?
|
|
|
|