Click here to Skip to main content
15,920,956 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: HTML, paragraphs, & margins problem: overwriting with 'div' Pin
David O'Neil2-Jun-05 3:42
professionalDavid O'Neil2-Jun-05 3:42 
GeneralRe: HTML, paragraphs, & margins problem: overwriting with 'div' Pin
DavidNohejl2-Jun-05 4:02
DavidNohejl2-Jun-05 4:02 
David O'Neil wrote:
Can you explain the difference between the declarations: ".text p { ..." and ".text { ..." in this case?

yes


David O'Neil wrote:
was under the impression that ".text { ..." declared a class called 'text', and that placing " < div class="text">" said: "use the class 'text' for the paragraphs in this division", but my understanding must be missing something, otherwise the 'margin' specifications would automatically apply on a per-paragraph basis?

you are right that .text create class called 'text'. But it's not "use the class 'text' for the paragraphs in this division" when you write <div class="text">. It's "use the class 'text' for this division". So your <div> element had margins as set in .text class, not paragraphs.


David O'Neil wrote:
Your:
".text p" - which means "apply this style to childs of .text"
is wrong (I believe).


hmm I admit what I wrote is not exact. Should be "apply this style to child paragraphs of element of 'text' class". What I meant is called selector.


David O'Neil wrote:
Did I get the semantics right this time, and is there anything else I am missing?

I think you got it right Smile | :) Look at CSS for more information about CSS, selectors in this case.


David O'Neil wrote:
What other things besides 'p' can go in place of the 'p' in ".text p { ..."?


All of them. Again, read about CSS in link I gave you ( on that page are links to CSS1,2,3 specifications).

David
GeneralRe: HTML, paragraphs, &amp; margins problem: overwriting with 'div' Pin
David O'Neil2-Jun-05 4:57
professionalDavid O'Neil2-Jun-05 4:57 
GeneralUrgent Help Pin
Usman Tasleem Akshaf1-Jun-05 17:06
Usman Tasleem Akshaf1-Jun-05 17:06 
GeneralRe: Urgent Help Pin
Christian Graus1-Jun-05 17:11
protectorChristian Graus1-Jun-05 17:11 
GeneralRe: Urgent Help Pin
Yulianto.2-Jun-05 23:06
Yulianto.2-Jun-05 23:06 
GeneralUrgent Help Pin
Usman Tasleem Akshaf1-Jun-05 5:18
Usman Tasleem Akshaf1-Jun-05 5:18 
GeneralRe: Urgent Help Pin
NeverHeardOfMe1-Jun-05 9:50
NeverHeardOfMe1-Jun-05 9:50 
GeneralAcessing ActiveX Component / Library not registered Pin
Florian Storck1-Jun-05 4:20
Florian Storck1-Jun-05 4:20 
GeneralStored Procedures Pin
Brendan Vogt31-May-05 20:28
Brendan Vogt31-May-05 20:28 
GeneralRe: Stored Procedures Pin
Christian Graus31-May-05 21:03
protectorChristian Graus31-May-05 21:03 
GeneralRe: Stored Procedures Pin
Brendan Vogt31-May-05 21:10
Brendan Vogt31-May-05 21:10 
GeneralRe: Stored Procedures Pin
NeverHeardOfMe1-Jun-05 9:57
NeverHeardOfMe1-Jun-05 9:57 
GeneralRe: Stored Procedures Pin
Christian Graus1-Jun-05 11:37
protectorChristian Graus1-Jun-05 11:37 
GeneralRe: Stored Procedures Pin
NeverHeardOfMe1-Jun-05 13:32
NeverHeardOfMe1-Jun-05 13:32 
Generalasp Pin
Anonymous31-May-05 17:52
Anonymous31-May-05 17:52 
GeneralRe: asp Pin
Anonymous31-May-05 18:21
Anonymous31-May-05 18:21 
GeneralRe: asp Pin
Vasudevan Deepak Kumar10-Jun-05 0:07
Vasudevan Deepak Kumar10-Jun-05 0:07 
GeneralUpdate HTML programmatically Pin
frycdf31-May-05 9:21
frycdf31-May-05 9:21 
GeneralRe: Update HTML programmatically Pin
Christian Graus31-May-05 12:21
protectorChristian Graus31-May-05 12:21 
GeneralRe: Update HTML programmatically Pin
frycdf1-Jun-05 4:31
frycdf1-Jun-05 4:31 
GeneralRe: Update HTML programmatically Pin
NeverHeardOfMe1-Jun-05 10:13
NeverHeardOfMe1-Jun-05 10:13 
GeneralRe: Update HTML programmatically Pin
Christian Graus1-Jun-05 11:15
protectorChristian Graus1-Jun-05 11:15 
GeneralReturning array from VB component to ASP Page Pin
Pavneet Singh31-May-05 6:33
Pavneet Singh31-May-05 6:33 
GeneralDomain Masking Code Pin
Anonymous30-May-05 14:09
Anonymous30-May-05 14:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.