Computer Forum  

Go Back   Computer Forum > Computer Forums > Programming Forum > CSS Forum

CSS Forum CSS Forum. Cascading style sheets coding, questions and answers. Includes css design, coding css1, css2, css3 and more.


Can CSS be applied to only part of a web page?

CSS Forum

CSS Forum. Cascading style sheets coding, questions and answers. Includes css design, coding css1, css2, css3 and more.


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-2008, 12:37 AM
Bob Bob is offline
Junior Member
 
Join Date: Jan 2008
Posts: 19
Bob RSS Feed
Can CSS be applied to only part of a web page?

If some wanted to apply CSS to only certain parts of a web page, could this be done? Could it be applied within a <div> </div>tag?
Reply With Quote
  #2 (permalink)  
Old 09-06-2008, 12:38 AM
Junior Member
 
Join Date: Sep 2008
Posts: 1
Seventoes RSS Feed
Give whatever you want to apply the CSS to a class, like:

<div class="someClassName">Text here that you want CSS to apply to</div>

Then in your CSS file put:

.someClassName {
stuff here
}
Reply With Quote
  #3 (permalink)  
Old 09-06-2008, 12:39 AM
Junior Member
 
Join Date: Aug 2008
Posts: 5
Nighthawk RSS Feed
Yes it can be applied to any part of the web page. If you want to apply it to just a div tag you don't even need a separate CSS file. Just use:

<div style="width:100px; background: none;" align="center"></div>

You could add whatever styles you want within the tag itself.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
if someone is accessing your router through wireless does this mean they r part... Mark H Wireless Networking Forum 4 09-03-2008 10:38 AM
do new amd processors come with the thermal paste pre applied on the cpu? euge963 AMD CPU Forum 3 08-24-2008 04:38 PM
i need a part for a Samsung 40" LCD. i have looked online and cannot find... mayavedo LCD Monitor Forum 1 07-10-2008 05:03 AM
I want to break apart the selector part of a css style? richard m CSS Forum 0 01-08-2008 10:57 AM
Will it be legal to use a small part of an existing big trademark-name for a... weconex Domain Name Forum 0 01-03-2008 03:43 PM


All times are GMT. The time now is 04:52 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93