brevardcountypcr Posted February 17, 2012 Share Posted February 17, 2012 need help on how to make a external CSS file. can someone show me i have made one in about 7 years ago . i forgot how to make a document for it ? Link to comment Share on other sites More sharing options...
Don E Posted February 17, 2012 Share Posted February 17, 2012 Check out these links: http://w3schools.com/css/default.asp http://w3schools.com/css/css_howto.asp Link to comment Share on other sites More sharing options...
brevardcountypcr Posted February 17, 2012 Author Share Posted February 17, 2012 Check out these links:http://w3schools.com/css/default.asphttp://w3schools.com/css/css_howto.asp ok thank youbut one thing i was confused on it<html><head><style type="text/css">body{background-color:#d0e4fe;}h1{color:orange;text-align:center;}p{font-family:"Times New Roman";font-size:20px;}</style></head><body><h1>CSS example!</h1><p>This is a paragraph.</p></body></html> see i want to make a external css file but it just show the code above when use the tryit editor on the site . that confused me i throught i would have to do a html document when i make it ? Link to comment Share on other sites More sharing options...
Don E Posted February 17, 2012 Share Posted February 17, 2012 That there is called a Internal Style Sheet. You can do that. Basically three ways to add CSS: Inline Style, Internal Style Sheet, and External Style Sheet(Recommended). External: <head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head> Internal(like what you pasted): <head><style type="text/css">hr {color:sienna;}p {margin-left:20px;}body {background-image:url("images/back40.gif");}</style></head> Inline: <p style="color:sienna;margin-left:20px">This is a paragraph.</p> That is a HTML document. Maybe you're use to seeing this: <!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head><body><h1>CSS example!</h1><p>This is a paragraph.</p></body></html> The mystyle.css would have all your styling for that page(s). mystyle.css (just an example): body (background-color: lightblue;} p { color: grey; text-indent: 50px;} h1 {background-color: yellow;} Link to comment Share on other sites More sharing options...
brevardcountypcr Posted February 17, 2012 Author Share Posted February 17, 2012 That there is called a Internal Style Sheet. You can do that. Basically three ways to add CSS: Inline Style, Internal Style Sheet, and External Style Sheet(Recommended). External:<head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head> Internal(like what you pasted): <head><style type="text/css">hr {color:sienna;}p {margin-left:20px;}body {background-image:url("images/back40.gif");}</style></head> Inline: <p style="color:sienna;margin-left:20px">This is a paragraph.</p> That is a HTML document. Maybe you're use to seeing this: <!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head><body><h1>CSS example!</h1><p>This is a paragraph.</p></body></html> The mystyle.css would have all your styling for that page(s). mystyle.css (just an example): body (background-color: lightblue;} p { color: grey; text-indent: 50px;} h1 {background-color: yellow;} ok thank you so much don. i was just so confused what i have to put in the external css file. just the way you explained the mystyle.css example that the way all externals should be is that correct ? Link to comment Share on other sites More sharing options...
Don E Posted February 17, 2012 Share Posted February 17, 2012 Yes, basically. Link to comment Share on other sites More sharing options...
brevardcountypcr Posted February 17, 2012 Author Share Posted February 17, 2012 Yes, basically.thank you but i found this page from my college years/* New Perspectives on HTML and XHTML 5th Edition Tutorial 4 Tutorial Case Online Scrapbooks Style Sheet Author: Date: Filename: scraps.css Supporting Files: back.jpg, bullet.jpg*/body {margin: 0px; color: brown; background: white url(back.jpg) repeat-y}h1, h2, h3 {font-family: Arial, Helvetica, sans-serif; color: orange}h1 {border-bottom: 2px solid orange; background-color: white; margin: 0px; padding: 0px}ul {margin-top:0px}#outer_container {width: 780px}#head {text-align: right}#links {float: left; width: 200px}#article {margin-left: 200px}#pullout {float: right; width: 250px; margin: 0px 0px 10px 10px; border: 5px outset orange; background-color: ivory; font-size: 10pt; font-family: Arial, Helvetica, sans-serif}address {text-align: center; font-style: normal; font-variant: small-caps; border-top: 2px solid orange; color: orange} what is the biggest/max px size i can make it ? Link to comment Share on other sites More sharing options...
Ingolme Posted February 18, 2012 Share Posted February 18, 2012 Biggest px size for what property? Link to comment Share on other sites More sharing options...
brevardcountypcr Posted June 2, 2012 Author Share Posted June 2, 2012 Biggest px size for what property?for any property . please also give a link on it . example 300/ 500px for examples Link to comment Share on other sites More sharing options...
thescientist Posted June 4, 2012 Share Posted June 4, 2012 you should be able to test that yourself. Link to comment Share on other sites More sharing options...
brevardcountypcr Posted June 17, 2012 Author Share Posted June 17, 2012 somehow my extenal sheet it not working what i did wrong ??? Link to comment Share on other sites More sharing options...
eTianbun Posted June 18, 2012 Share Posted June 18, 2012 somehow my extenal sheet it not working what i did wrong ??? You asking us? How did you xpect us to know, when we dont know how you linked to the stylesheet or what you current code look like? Link to comment Share on other sites More sharing options...
dsonesuk Posted June 18, 2012 Share Posted June 18, 2012 what is the biggest/max px size i can make it ? ??? I ready answered this before! THERE IS NO MAX/BIGGEST SET SIZE, again it like asking "how long is a piece of string" answer "about as long as you decided to make it", another clue, if it extends beyond window width of YOUR browser, causing scrollbars to appear, THEN it is probably to wide FOR YOUR browser window. somehow my extenal sheet it not working what i did wrong ??? Only reply we can give is "yes! I guess you must have done something wrong" Link to comment Share on other sites More sharing options...
brevardcountypcr Posted June 19, 2012 Author Share Posted June 19, 2012 ??? I ready answered this before! THERE IS NO MAX/BIGGEST SET SIZE, again it like asking "how long is a piece of string" answer "about as long as you decided to make it", another clue, if it extends beyond window width of YOUR browser, causing scrollbars to appear, THEN it is probably to wide FOR YOUR browser window. Only reply we can give is "yes! I guess you must have done something wrong"Okay thank you. I have another question can I put a color background behind my background picture that is already showing ??? Like this for a example http://www.brevardco.../Ps3repair.html Link to comment Share on other sites More sharing options...
eTianbun Posted June 19, 2012 Share Posted June 19, 2012 background:url('image.gif') red; Yes! Link to comment Share on other sites More sharing options...
brevardcountypcr Posted June 19, 2012 Author Share Posted June 19, 2012 background:url('image.gif') red; Yes! Thank you Link to comment Share on other sites More sharing options...
brevardcountypcr Posted June 21, 2012 Author Share Posted June 21, 2012 background:url('image.gif') red; Yes! it didn't work http://www.brevardco.../Ps3repair.htmlI fix it{background-color:yellow;} Link to comment Share on other sites More sharing options...
dsonesuk Posted June 21, 2012 Share Posted June 21, 2012 Your doctype declaration is wrong try <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">, if you use css3 background-size it seems you can't use shorthand 'background:' on its own? Link to comment Share on other sites More sharing options...
brevardcountypcr Posted July 5, 2012 Author Share Posted July 5, 2012 Your doctype declaration is wrong try <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">, if you use css3 background-size it seems you can't use shorthand 'background:' on its own?Can someone explain to me about the !doctypes because my teacher from college never explained it to me ? And when the best time to use each one . Link to comment Share on other sites More sharing options...
Don E Posted July 5, 2012 Share Posted July 5, 2012 See this link: http://www.w3schools.com/html5/tag_doctype.asp and this link: http://www.w3schools.com/html/html_doctype.asp Link to comment Share on other sites More sharing options...
brevardcountypcr Posted July 6, 2012 Author Share Posted July 6, 2012 See this link: http://www.w3schools...tag_doctype.asp and this link: http://www.w3schools...tml_doctype.asp ok thank you but I wanted to know when the best time to use the differanent doctypes for difference html codes . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.