Orkal3 Posted December 1, 2007 Share Posted December 1, 2007 I need help on making CSS for a website. It should look something like this.The "Foreground has the text and everything while the "Background" is just a plain color with nothing in it.Can someone be of an assistance? I'm not really good with CSS. Link to comment Share on other sites More sharing options...
Synook Posted December 2, 2007 Share Posted December 2, 2007 Well you could make the body have the background color and have a division that will hold the content <style type="text/css"> body { background-color:#666666; /*Background color;*/ } div#foreground { background-color:#333333; /*Foreground background color :) */ border:2px solid #000000; /*Border*/ color:#FFFFFF; /*text color*/ width:950px; /*Limit width*/ }</script><!-- ... end head, begin body ... --><div id="foreground"> All your text goes here</div> Link to comment Share on other sites More sharing options...
Orkal3 Posted December 2, 2007 Author Share Posted December 2, 2007 Thank you.But theres a problem to it. All I get is the background. Is it the width I need to change? Link to comment Share on other sites More sharing options...
Synook Posted December 3, 2007 Share Posted December 3, 2007 Whoops typo (</script> instead of </style>) <style type="text/css"> body { background-color:#666666; /*Background color;*/ } div#foreground { background-color:#333333; /*Foreground background color :) */ border:2px solid #000000; /*Border*/ color:#FFFFFF; /*text color*/ width:950px; /*Limit width*/ }</style><!-- ... end head, begin body ... --><div id="foreground"> All your text goes here</div> Link to comment Share on other sites More sharing options...
Orkal3 Posted December 4, 2007 Author Share Posted December 4, 2007 Thank you. Just one thing, can you change the background color to background image? Link to comment Share on other sites More sharing options...
Ingolme Posted December 4, 2007 Share Posted December 4, 2007 You can use the background-image CSS property:background-image: url(myimage.gif); Link to comment Share on other sites More sharing options...
Orkal3 Posted December 4, 2007 Author Share Posted December 4, 2007 Do I put it between:body {}or below it? Link to comment Share on other sites More sharing options...
Ingolme Posted December 4, 2007 Share Posted December 4, 2007 You put it in the same place you put background-color. Link to comment Share on other sites More sharing options...
Synook Posted December 5, 2007 Share Posted December 5, 2007 So you could style your foreground to have a background-image too. Link to comment Share on other sites More sharing options...
Orkal3 Posted December 5, 2007 Author Share Posted December 5, 2007 What about the border for the foreground? Can I change that too? If so, how? Link to comment Share on other sites More sharing options...
Ingolme Posted December 5, 2007 Share Posted December 5, 2007 A basic border in CSS can be done like this:border: 1px solid red;It can be broken down to:border-width: 1px;border-color: red;border-style: solid;You must give the border a style and width for it to show up. Link to comment Share on other sites More sharing options...
Orkal3 Posted December 6, 2007 Author Share Posted December 6, 2007 Is there anyway I could add an image for the border? Link to comment Share on other sites More sharing options...
Ingolme Posted December 6, 2007 Share Posted December 6, 2007 No, not without more complex CSS methods and various extra <div> tags and background images. Link to comment Share on other sites More sharing options...
Synook Posted December 6, 2007 Share Posted December 6, 2007 CSS3 has a border-image property, but unfortunately no browsers implement it yet Link to comment Share on other sites More sharing options...
Orkal3 Posted December 7, 2007 Author Share Posted December 7, 2007 Oh, well thats ok. Thanks for helping me. I got every information I needed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.