Guest sadgirl Posted May 11, 2006 Share Posted May 11, 2006 (edited) hi, i got a problem with the external link and the </div> please, i don't know how to save my css stylesheet into .css, could anyone help me please, i really like this stylesheet, all i want is i just want to use css stylesheet to make1 homepage with many links, save in .css.I would be appreciate if any1 could help me with my stylesheet, pretty please!This is my stylesheet *************************************** <html><head><title>Three Column CSS Layout with Header</title><style type="text/css">body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0;}#header { margin: 20px; padding: 10px; height: 100px;}#left { position: absolute; left: 15px; top: 160px; width: 200px;}#center { top: 0; margin-left: 230px; margin-right: 230px;}#right { position: absolute; right: 15px; top: 160px; width: 200px;}</style></head><body><div id="header">This is where i want put my welcome image</div><div id="left"><div id="content">content goes here</div><div id="menu">navigation goes here</div></div><div id="center"><div style=This is where i want to put my external link from the "right" side</div><div id="right"><div style="background:#FFCCFF url(moonstarbg.gif);">this is where i want to put my content</div></body></html> Edited May 11, 2006 by aspnetguy Link to comment Share on other sites More sharing options...
Kosher Kid Posted May 11, 2006 Share Posted May 11, 2006 i think you're mixing things up a bit...a style sheet is for controling the display of html content; it cannot include the html or the content itself.you should create spearate .css and .htm files and reference the style sheet in the header.to create a stylesheet, just use any text editor, such as notepad and then save the file with a .css extension.for example: BODY { font-family: Arial, Helvetica, sans-serif; font-size: 10 pt } BLOCKQUOTE { border: solid thin aaa; padding: 2 pt } H3 { text-align: center; text-transform: uppercase; color: fff; background: 000080; border: ridge 6pt eee; padding: 2 pt; font-size: 160% } could be a stylesheet saved as mystyles.cssthen, reference it in the header of the html file: <head><title>my title</title><link rel="stylesheet" type="text/css" href="mystles.css"></head><body><h1>big head</h1><p>stuff i wanna say</p>etc...</body> does this help? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 11, 2006 Share Posted May 11, 2006 Right, look at all the code in your <head>..</head> section: <head><title>Three Column CSS Layout with Header</title><style type="text/css">body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0;}#header { margin: 20px; padding: 10px; height: 100px;}#left { position: absolute; left: 15px; top: 160px; width: 200px;}#center { top: 0; margin-left: 230px; margin-right: 230px;}#right { position: absolute; right: 15px; top: 160px; width: 200px;}</style></head> If you want to create a CSS sheet out of these styles, first you copy everything between the <style> tags (but not the tags themselves) and save this as styles.css or some other file. So this is your stylesheet: body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0;}#header { margin: 20px; padding: 10px; height: 100px;}#left { position: absolute; left: 15px; top: 160px; width: 200px;}#center { top: 0; margin-left: 230px; margin-right: 230px;}#right { position: absolute; right: 15px; top: 160px; width: 200px;} And then you use the <link> tag to link that stylesheet to your page: <head><title>Three Column CSS Layout with Header</title><link rel="stylesheet" type="text/css" href="styles.css"></head> 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