|
CSS tips, questions, or advice?
|
|
02-27-2009, 01:21 PM
Post: #1
|
|||
|
|||
|
CSS tips, questions, or advice?
I'm working on my website about CSS and was wondering if anyone here would like to chip in and help contribute content ideas.
Basically: if you have any sort of CSS tips, or advice, or would like to see a collection about something related to CSS (anything!) or even actual hacks or code snippets, or common CSS problems, please post your ideas and requests here and I'll see if I can work them into the new website. - Matt codeboards Admin |
|||
|
02-27-2009, 05:03 PM
Post: #2
|
|||
|
|||
|
RE: CSS tips, questions, or advice?
Always start off your CSS with
* { padding: 0; margin: 0; } |
|||
|
02-27-2009, 11:37 PM
Post: #3
|
|||
|
|||
|
RE: CSS tips, questions, or advice?
Interesting that you suggest that; I find myself doing that frequently with body and form elements, but I don't think it's necessary for everything?
- Matt codeboards Admin |
|||
|
02-28-2009, 04:28 PM
Post: #4
|
|||
|
|||
|
RE: CSS tips, questions, or advice?
I'd do it for everything because you never know when IE is going to add an additional 2 pixels of padding on to something. I can't think of a reason not to do it.
|
|||
|
03-03-2009, 03:36 PM
Post: #5
|
|||
|
|||
|
RE: CSS tips, questions, or advice?
I think it's a good idea. I haven't done it for everything, but it seems most times when I have a cross-browser problem, that little line fixes it.
Yilduz Network I am the Einstein of PHP. $E = $m * pow($c,2); |
|||
|
03-03-2009, 10:07 PM
Post: #6
|
|||
|
|||
|
RE: CSS tips, questions, or advice?
Ah, I guess that is a good tip. There's no reason for margins or paddings unless specified explicitly, I suppose. You get more control over your layout that way.
What else? - Matt codeboards Admin |
|||
|
03-04-2009, 06:58 AM
Post: #7
|
|||
|
|||
|
RE: CSS tips, questions, or advice?
Images used simply for visual appeal and not actual content should usually be set as a background using CSS instead of an IMG tag. This may be more of an SEO thing I guess but it still gets you thinking in the CSS mindset. On that note, if you have a page header with an image, you should put text within the tag as the content and the image should be a background. To hide the text use text-indent: -9999px. There is a lot more I could tell you but it's more SEO than CSS.
|
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help



