Hi i am new to web design and im creating a website, but i want a two strips either side of the webpage for example this page has two grey strips either side, could someone help please????
Page 1 of 1
Background Different color either side of the web page
#2
Posted 22 January 2012 - 08:39 PM
This forum has 2 grey strips either side because the main content goes over it.
You'll just have to edit your background colour to grey and make sure your content is centered to the middle of the page with a different colour.
You'll just have to edit your background colour to grey and make sure your content is centered to the middle of the page with a different colour.
#3
Posted 23 January 2012 - 10:18 PM
you can add a background to any of the elements using css. For example:
<html>
<head>
<style type="text/css">
html{
background-color: #DDD
}
p {
width:100px;
color: blue;
margin: 0 auto;
}
body {
margin: 0 auto;
background-color: #FFF;
width: 80%;
}
</style>
</head>
<body>
<p>site goes here</p>
</body>
</html>
#4
Posted 24 January 2012 - 07:55 PM
Try using <table> or <div> tags. Good tutorials: W3Schools tables/divs
#5
Posted 24 January 2012 - 08:42 PM
That single page marks out what is wrong with W3Schools. I mean, tables or layout... Pleeeeeeease!
#7
Posted 25 January 2012 - 08:06 AM
If you want two narrow strips at each side of a page, you can create an image of a desired width x enough height to fill all browser window heights and put one as a background-image to the html style with background-position: left top; background-repeat: no-repeat; and use it for the other side to the body style with background-position: right top; background-repeat: no-repeat;
This post has been edited by Wickham: 25 January 2012 - 08:08 AM
- ← help with my web page zoom
- CSS, XHTML/HTML & JavaScript
- Horizontal Nav Bar with evenly spaced <li>'s →
Share this topic:
Page 1 of 1
Help



















