This is a discussion on "Span questions" within the Web Page Design section. This forum, and the thread "Span questions are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Span questions
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi
When I first used css I had some issues around the <span clsdd="lkhkjh">kjdhdsf</span>. I can't remember why but I got the idea that I shouldn't use it..... Now that I am getting a littlre more confident I find that I want a selector that carries none of its own formating (yes I know its inline). Am I correct in thingking that I should use:
p {display:inline;} which works but is a pain... thanks Edward |
|
|
|
#2
|
|||
|
|||
|
Re: Span questions
divs are for defining sections
spans are for adding style to specific elements and aren't supposed to serve as dividers
|
|
#3
|
|||
|
|||
|
Re: Span questions
To clarify one of your other questions: Use class where you expect there to be multiple occurances of that styling on a page. Use id when you want some unique styling, as there should only be one occurance of each id on a page, but you can of course use the same id on a different page. 'class' and 'id' can be used on any element. |
![]() |
| Tags |
| span, questions |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can <span></span> tags have position relative? | Oak | Web Page Design | 13 | Mar 9th, 2008 17:04 |
| From table tags to div and span | abdoukadri | Web Page Design | 6 | Dec 5th, 2007 22:57 |
| <SPAN> help | Access | JavaScript Forum | 2 | Nov 3rd, 2007 18:13 |
| Div and Span tags... | jjgamepro17 | Web Page Design | 4 | Nov 7th, 2006 19:22 |
| Wrapping by span | hessodreamy | Web Page Design | 3 | Sep 14th, 2005 07:34 |