CSS Design Tips.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

CSS Design Tips.

Post by JellyFish »

CSS tips on your experience with CSS layout design. Some basic 'need-to-know' CSS designer tricks and hacks.

Links to necessary articles and tutorials.

Help people who read this post, including me, be a better designer. :D

Thanks for reading and all help is appreciated.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Tips? Practice.

And read articles at A List Apart. I've learned most everything that I know regarding CSS from there.
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

IE Hack

Post by toasty2 »

To do something IE only, put an underscore in front of it.

Like:

Code: Select all

div.stuff
{
width: 200px; /* Firefox and other browsers */
_width: 210px; /* IE only */
}
Its not valid, but neither is IE. :D
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: IE Hack

Post by Luke »

toasty2 wrote:To do something IE only, put an underscore in front of it.

Like:

Code: Select all

div.stuff
{
width: 200px; /* Firefox and other browsers */
_width: 210px; /* IE only */
}
Its not valid, but neither is IE. :D
Why not serve ie its own css file?

Code: Select all

<!--[if IE]>

  <link rel="stylesheet" href="ie.main.css" media="screen" type="text/css" />

<![endif]-->
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Post by toasty2 »

Its easier to have just one CSS file though. :wink:
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Both are good in my opinion. :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Have you read the Useful Resources thread?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I completely disagree. Why crowd my valid (and sexy) css file with mutated, totally UNsexy ie css hacks?? IE is the only browser that needs any special attention generally, so it makes sense to give it its own file. One giant css file for everything gets bulky and crowded. I have one for print, one for ie, one for most everything else, one for the winter accents, etc. This is one of the primary benefits of stylesheets. :?
Post Reply