piazon79 Posted October 27, 2008 Share Posted October 27, 2008 im new to php, html, and css so please be as specific as you can if you answer. if you go here http://www.websitetemplatedesign.com/ and see this site it has the general design i like. by that i mean the webpage in the middle with the background image on either side. I have my page centered but my background image shows in between my boxes (if that makes sense) and it doesn't look as nice. how do i create a page so that the background image only shows up to the right and left of my actual content? TIA! Quote Link to comment Share on other sites More sharing options...
piazon79 Posted October 27, 2008 Author Share Posted October 27, 2008 or actually like this site with the borders going all the way down on both sides and the background image only showing up on the right and left, like the main page of this site Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 27, 2008 Share Posted October 27, 2008 Style Sheet body {background-image:url (url to image here);} div.contain {width:some width:margin:o auto;} html <body> <div class="contain"> </div> </body> Quote Link to comment Share on other sites More sharing options...
piazon79 Posted October 28, 2008 Author Share Posted October 28, 2008 Style Sheet body {background-image:url (url to image here);} div.contain {width:some width:margin:o auto;} html <body> <div class="contain"> </div> </body> I already have a background image in place. Do you mean something like this for the other part? div.contain {width: 25 :margin: auto;} ????? for example and where exactly do i insert this code? anywhere between those tags? Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 28, 2008 Share Posted October 28, 2008 div contain is the div containing your actual page 25 is way too thin Margin:0 auto centers the div in all browsers.. then have the background on the body of the page if your stuck on this you really are in need of a basic html tutorial tho Quote Link to comment Share on other sites More sharing options...
piazon79 Posted October 29, 2008 Author Share Posted October 29, 2008 thank you very much! i got it now Quote Link to comment Share on other sites More sharing options...
piazon79 Posted October 29, 2008 Author Share Posted October 29, 2008 one other quick question. I got it working using the code you gave, but my website is made up of many pages, index.php being the main page. How can i add the div style to all webpages without having to go in to each one and add <div class="contain"> ? I added that to the index.php but beyond the main page it goes back to how it was. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 29, 2008 Share Posted October 29, 2008 is there any div that surrounds your entire page on the other pages? div .contain is just my example any div that is around all your content will work Quote Link to comment Share on other sites More sharing options...
piazon79 Posted October 30, 2008 Author Share Posted October 30, 2008 thanks for your help! got it now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.