473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

background border on right and left

The client wants the page to have both a left border (purple) and a right
border (green).
Is there any way to stretch a background image to fit the viewport? Or
should I divide
the background into columns, each a different color?

Mary Ellen
Doctor Science, MA
Jul 20 '05 #1
7 14557
Brian wrote:
body {
border-left: thin solid #909 ;
border-right: thin solid #090 ;
}
I was unclear. By "border" I meant the sort of border+background you see
here:
http://www.pambytes.com/borders/paper/index1.html
(example chosen by random googling). The client wants quite a wide colored
band
running down each side of the viewport.
Erm, why would you use an image for borders?


Because they want something wide (and later I suspect they will want
textures, etc.). Also,
IE5.5 (at least) puts a body border (as in your example) outside the scroll
bar.

While googling I found this example:
http://www.bigbaer.com/css_tutorials...css.template.h
tm

and am looking at the code in the hopes I can alter it to be useful.

Mary Ellen
Doctor Science, MA
Jul 20 '05 #2
Replying to myself, I've put *something* together here:

http://www.alternateuniverses.com/test/anetry.html

Do I need to use a box hack on my "main" division to get it to go up to the
top of the screen
in IE6.0? It looks just right in IE5.5.

Mary Ellen
Doctor Science, MA
Jul 20 '05 #3
Mary Ellen Curtin wrote:
Brian wrote:
body {
border-left: thin solid #909 ;
border-right: thin solid #090 ;
}
I was unclear. By "border" I meant the sort of
border+background you see here:
http://www.pambytes.com/borders/paper/index1.html


Nothing happens. "Operation timed out..." Server problems?
Erm, why would you use an image for borders?


Because they want something wide


body {
border-left: 10px solid #909 ;
border-right: 10px solid #090 ;
}
(and later I suspect they will want textures, etc.).
Textured, you say? I suppose images could be used for that. You can
use a background image, 1 pixel high, and use repeat-vertical to have
it run down the page. But you can only have 1 background image for
any given element. You'll have to patch something together for the
other border.
Also, IE5.5 (at least) puts a body border (as in your example)
outside the scroll bar.


Have you tried putting a div inside the body, and applying the borders
to the div? You'd have to set height: 100%; mind, I haven't tested
that idea.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4
Mary Ellen Curtin wrote:

http://www.alternateuniverses.com/test/anetry.html

Do I need to use a box hack on my "main" division to get it to go
up to the top of the screen in IE6.0? It looks just right in IE5.5
There is a margin-top to the h1. Is that the problem? If not, please
elaborate.
Mary Ellen
Doctor Science, MA


Would you consider fixing your sig? Put "-- " (note the space) on a
line by itself, then put your sig below it. Proper sig delimiters
make replying easier.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #5
Mary Ellen Curtin wrote:
| The client wants the page to have both a left border (purple) and a right
| border (green).
| Is there any way to stretch a background image to fit the viewport? Or
| should I divide
| the background into columns, each a different color?

Hi Mary, an easy solution could be this if you have to use
graphics borders. CSS part:

<style type="text/css">

html, html>body{
height: 100%;
/*just added for testing purpose even with blank page in
Opera and Mozilla, remove it when you've filled up the page*/
}

body{
background: url("leftborder.gif") top left repeat-y
}

div#main{
background: url("rightborder.gif") top right repeat-y;
margin: 0 100px;
}

</style>

and in the html:

<body>
<div id="main">
<!-- put all content here -->
</div>
</body>

Note the right and left margin should have at least same width
of the background images.

HTH,
SantaKlauss
Jul 20 '05 #6
Hi Mary,
just a little thing to add: if you want the body background-color to
be set, and I suppose you would, just have to add the color in the body
background shorthand and leave the main content with transparent
background, like this:

body{
background: #69C url("leftborder.gif") top left repeat-y
}

div#main{
background: transparent url("rightborder.gif") top right repeat-y;
margin: 0 100px
}

HTH,
SantaKlauss
Jul 20 '05 #7
Ooops, sorry: have to use padding instead of margin.

body{
background: #69C url("leftborder.gif") top left repeat-y
}

div#main{
background: transparent url("rightborder.gif") top right repeat-y;
padding: 0 100px
}

*<|:-)
SantaKlauss
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: CMAR | last post by:
I have a design of a frameless page on my practice website: http://home.ne.rr.com/thespar/designerN.htm The idea is to have a #left navigation bar which is absolutely positioned and which...
11
by: Konrad Den Ende | last post by:
I have a function returning a string but the problem is that the color of it is blue which suits me well for some pages but not for others. Is it possible to "feel" what the color of the background...
0
by: Skeeve | last post by:
Hi there, I'm trying to create a containing box (relative position), and within it, I'm trying to line that box with four (top, right, left, bottom) thin boxes that contain a repeated background...
2
by: Skeeve | last post by:
Hi there, I'm trying to create a containing box (relative position), and within it, I'm trying to line that box with four (top, right, left, bottom) thin boxes that contain a repeated background...
14
by: arteccentrix | last post by:
Please bear with me as I am new to both Firefox and CSS. I have browsed through a number of groups looking for similar problems to my own but can't find a definitive answer. If anyone here can help...
4
by: Philipp Kraus | last post by:
Hi, I have one problem with my position of my background image. I have created one div-tag that has a background image, which should be fixed during scrolling. On the left side of the div is my...
2
by: mdejac | last post by:
I was wondering why the background color is not showing up in Mozilla. When I view the page there is a light blue background, when it should be black. Thank you for any help. ...
16
by: stevedude | last post by:
CSS newbie again. I have a problem trying to get coffee mug images within anchor tags to center with my link text for a vertical list menu. If I use the horizontal/vertical properties of...
10
by: VividWeb | last post by:
Hi. I am relatively new to CSS and HTML but have a basic understanding of most things. One of my backgrounds is not positioning correctly in IE 7 or AOL. The background behind the content...
0
by: ton | last post by:
Hi, I have an Image which is dark grey/black, at the top a white line, at the left site a white line as well. At 192 px from the left of the screen I position a DIV with this image as the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.