View previous topic :: View next topic |
Author |
Message |
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Fri Feb 03, 2006 10:24 am Post subject: A couple of CSS Tips |
|
|
I have found a few neat tricks for CSS.
1) Did you know you can have multiple classes assigned to an attribute?
Using 'class="front feature"' would assign both the front rules and the feature rules. Note that the two classes need to be seperated by a space and not a comma.
2) Center aligning a block element
Quote: |
#wrapper
{
width: 700px;
margin: 0 auto;
} |
Then just assign the wrapper class to anything you want to center on that page. If you want to work properly for older versions of IE you will have to do some extra work. _________________ I shine |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
|
Back to top |
|
|
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Sat Feb 04, 2006 12:38 pm Post subject: |
|
|
Thanks!
I have found a few more as well.
There is a text-transofrm command. YOu can use:
text-transform: lowercase;
text-transform: uppercase;
text-transform: capitalize;
This allows you to have an output consistency on your site, even if you have multiple people contributing content.
If you want to make a seperate css file for a handheld device you can do that fairly easily as well:
<link type="text/css" rel="stylesheet" href="handheld.css" media="handheld" />
Then just use the handheld.css file to configure your output for handheld devices. Voila. _________________ I shine |
|
Back to top |
|
|
paul
Joined: 11 Oct 2004 Posts: 128
|
Posted: Sat Feb 04, 2006 5:16 pm Post subject: |
|
|
twinkle wrote: |
If you want to make a seperate css file for a handheld device you can do that fairly easily as well:
<link type="text/css" rel="stylesheet" href="handheld.css" media="handheld" />
Then just use the handheld.css file to configure your output for handheld devices. Voila. |
I didn't know that you can do that for a handheld devices. Thanks!
Paul _________________ World Countries | Survival Skills |
|
Back to top |
|
|
x-raysteve
Joined: 01 Feb 2006 Posts: 53
|
Posted: Sat Feb 04, 2006 6:07 pm Post subject: |
|
|
Wow I didn't know that either. Now we need some tricks and tips on how to best format our alternate css files to make them display well on a pocket device.
Good tip. |
|
Back to top |
|
|
Missie
Joined: 06 Feb 2006 Posts: 25
|
Posted: Mon Feb 06, 2006 7:23 pm Post subject: |
|
|
Thanks for the tips twinkle! They will come in really useful. I never thought that there were such cool tricks thoguh. I hope that I can get them to wok right. I'm kinda new at this knida thing. I will check back here soon to see if ya posted any new ones for us. |
|
Back to top |
|
|
Stitch
Joined: 07 Feb 2006 Posts: 43
|
Posted: Sat Feb 11, 2006 6:13 pm Post subject: |
|
|
paul wrote: | twinkle wrote: |
If you want to make a seperate css file for a handheld device you can do that fairly easily as well:
<link type="text/css" rel="stylesheet" href="handheld.css" media="handheld" />
Then just use the handheld.css file to configure your output for handheld devices. Voila. |
I didn't know that you can do that for a handheld devices. Thanks!
Paul |
Yeah, I didn't know that either. That's extremely useful information that I will use for my future websites. Thanks a ton for that tip! |
|
Back to top |
|
|
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Thu Feb 23, 2006 11:15 am Post subject: |
|
|
The amazing thing is it works! I do not have a handheld device, but I set it up on one of my sites and used a friends pocket pc to look and it turns out really good! _________________ I shine |
|
Back to top |
|
|
|