tytwp Posted December 30, 2006 Share Posted December 30, 2006 HiAs a complete newbie to it, I'm trying to work through the W3Schools CSS tutorials but am confused, is it possible to have a multi page left margin setting in an external style sheet ?The Tutorial only appears to have the html coding below - which works fine on single pagesIf the answer is no, am I missing something very basic regarding the use of ext style sheets ?<html><head><style type="text/css">p.leftmargin {margin-left: 2cm}</style></head><body><p>This is a paragraph with no margin specified</p><p class="leftmargin">This is a paragraph with a specified left margin</p></body></html> Link to comment Share on other sites More sharing options...
PrateekSaxena Posted December 30, 2006 Share Posted December 30, 2006 I dont think that it is suppose to be 2cm. try this code- <html><head><style type="text/css">p.leftmargin {margin-left: 2px}</style></head><body><p>This is a paragraph with no margin specified</p><p class="leftmargin">This is a paragraph with a specified left margin</p></body></html> Tryit Editor<html><head><style type="text/css">p.leftmargin {margin-left: 2px;}</style></head><body><p>This is a paragraph with no margin specified</p><p class="leftmargin">This is a paragraph with a specified left margin</p></body></html> Link to comment Share on other sites More sharing options...
tytwp Posted December 30, 2006 Author Share Posted December 30, 2006 Ah, I've answered my own question by referring tohttp://friendlybit.com/css/beginners-guide...-and-standards/I now understand the relevance of selectors.Thanks anyway Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now