Gears Posted September 16, 2009 Share Posted September 16, 2009 For all future templates for WHMCS I recommend starting the stylesheets with the following code: * { margin: 0; padding: 0; line-height: 1.5em; } 0 Quote Link to comment Share on other sites More sharing options...
cenourinha Posted September 17, 2009 Share Posted September 17, 2009 Agreed. 0 Quote Link to comment Share on other sites More sharing options...
zhu Posted September 17, 2009 Share Posted September 17, 2009 Why?!? That would screw the spacing right up. What's gonna happen to newbies trying to integrate it with designs that use different values? Unnecessary IMO. 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted September 17, 2009 Author Share Posted September 17, 2009 Why?!? That would screw the spacing right up. What's gonna happen to newbies trying to integrate it with designs that use different values? Unnecessary IMO. I strongly feel that every style sheet should start with this--it fixes many problems. "Newbies" probably have more problems without it being there. Besides, a novice would probably have hired a professional to design/code the site, and that professional most likely would have used that line of code in the style sheet. line-height: 1.5em; maybe not be completely necessary but margin: 0; and padding: 0; are. 0 Quote Link to comment Share on other sites More sharing options...
Redundant Posted September 17, 2009 Share Posted September 17, 2009 This would make for some crummy looking typography with regard to p tags and heading tags. It can also make your ul's a bit quirky. 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted September 17, 2009 Author Share Posted September 17, 2009 This would make for some crummy looking typography with regard to p tags and heading tags. It can also make your ul's a bit quirky. You can (and should) simply add p { margin: 5px 0 5px 0; } if you would like a global style applied to all paragraphs. This goes for headings and anything else. As for ul's, it would actually help. Instead of allowing different browsers to apply different default margins and paddings, it's best to have everything set to 0. Then when you apply a style to an element, you know exactly how much margin and padding it will have. 0 Quote Link to comment Share on other sites More sharing options...
SwiftModders Posted September 17, 2009 Share Posted September 17, 2009 Shouldn't be necessary if people are integrating their website design into WHMCS and using a reset.css file which most modern sites should. 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted September 17, 2009 Author Share Posted September 17, 2009 Shouldn't be necessary if people are integrating their website design into WHMCS and using a reset.css file which most modern sites should. John, that's part of my point. People that frequently write CSS usually use a reset sheet or the code in my original post: * { margin: 0; padding: 0; } So that means when WHMCS (code that does not use a reset) is integrated with a web site (that does use a reset) an issue arises with margins and padding. Some browsers have default margins and paddings. So that is why I recommend the future templates of WHMCS to start with * { margin: 0; padding: 0; } PS. I don't personally use a big reset sheet. I just use that one bit of code. 0 Quote Link to comment Share on other sites More sharing options...
SwiftModders Posted September 18, 2009 Share Posted September 18, 2009 Hmm, never had any issues, but then again I'm a web designer so that's unfair to say haha. 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted September 18, 2009 Share Posted September 18, 2009 Any developer that's current with standards is going to use a full reset and not the half-assed version. If you want values reset, you do all, not just the "minimal" version. Also, if you're resetting, why would you even add in line-height? If you need line-height edit the proper css function; Resetting is for resetting. I always use YUI's: /* Global reset */ /* Based upon 'reset.css' in the Yahoo! User Interface Library: http://developer.yahoo.com/yui */ *, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td { margin:0; padding:0 } table { border-collapse:collapse; border-spacing:0 } fieldset, img { border:0 } address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal } ol, ul, li { list-style:none } caption, th { text-align:left } h1, h2, h3, h4, h5, h6 { font-size:100%; font-weight:normal } q:before, q:after { content:''} /* Global reset-RESET */ /* The below restores some sensible defaults */ strong { font-weight:bold } em { font-style:italic } a img { border:none } /* Gets rid of IE's blue borders */ .clear { clear:both } 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted September 18, 2009 Share Posted September 18, 2009 Id just love valid markup. The css issues take a lot less time resolve. =P 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted September 19, 2009 Author Share Posted September 19, 2009 Any developer that's current with standards is going to use a full reset and not the half-assed version. If you want values reset, you do all, not just the "minimal" version. Also, if you're resetting, why would you even add in line-height? If you need line-height edit the proper css function; Resetting is for resetting. I always use YUI's: This is completely untrue. Many developers do not use full reset sheets and your opinion is biased. I know many experienced developers that only use one single line: * { margin: 0; padding: 0; } It is a matter of preference and one could argue against a full, bloated reset sheet. By all means, use the Yahoo library. But don't claim that "any developer" will also use a full reset sheet like you. That is just completely untrue. So I still say that the WHMCS stylesheets begin with * { margin: 0; padding: 0; } and only that. No need to introduce bloat. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.