ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A couple of CSS Tips

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> JavaScript / DHTML / HTML / CSS
View previous topic :: View next topic  
Author Message
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Fri Feb 03, 2006 10:24 am    Post subject: A couple of CSS Tips Reply with quote

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
View user's profile Send private message
administrator
Site Admin


Joined: 01 Oct 2004
Posts: 183

PostPosted: Fri Feb 03, 2006 10:30 am    Post subject: Reply with quote

Nice tips Twinkle! Thanks Smile
_________________
Peter
ASP & ASP.NET Articles and Tutorials
Back to top
View user's profile Send private message
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Sat Feb 04, 2006 12:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Sat Feb 04, 2006 5:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
x-raysteve



Joined: 01 Feb 2006
Posts: 53

PostPosted: Sat Feb 04, 2006 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Missie



Joined: 06 Feb 2006
Posts: 25

PostPosted: Mon Feb 06, 2006 7:23 pm    Post subject: Reply with quote

Thanks for the tips twinkle! Smile They will come in really useful. Smile I never thought that there were such cool tricks thoguh. Smile 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. Smile
Back to top
View user's profile Send private message
Stitch



Joined: 07 Feb 2006
Posts: 43

PostPosted: Sat Feb 11, 2006 6:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address MSN Messenger
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Thu Feb 23, 2006 11:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> JavaScript / DHTML / HTML / CSS All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial