[web] html site border

Started by
3 comments, last by Exogenesis 13 years, 6 months ago
I've waited a few hours in irc channels and talking to folks trying to get a definitive answer, but it's been a waste of time. Simply, I wish to use an image along the left and right sides of my site but I'm having no such luck.

<div id="leftPillar" class="leftPillar">                                        </div>                <div id="rightPillar" class="rightPillar">                                        </div>

This is formatted by this css:

#leftPillar{    background-image: url(../images/pillar.png);    background-repeat: repeat-y;    position: absolute;    left: 0px;    top: 0px;    text-decoration: none;}#rightPillar{    background-image: url(../images/pillar.png);    background-repeat: repeat-y;    position: absolute;    right: 0px;    top: 0px;    text-decoration: none;}


The image does not show at all for some unknown reason. Please help me
C++: Where your friends have access to your private members
Advertisement
Looks like you probably need to specify a width and height for your pillars. I assume height should be 100% and width would be the width of your PNG, like 15px.

Also I'd put "position: relative" on the body.

Additionally, if you don't want your pillars to move if your content goes beyond the bottom of the browser window, you might want to use position: fixed instead of absolute on your pillars.
It depends on what styling you have on the site already but I guess you could try using the float attribute.

Something along these lines

<html><head><style type="text/css"><!--body {  margin: 0px;  padding: 0px;}#leftcol {  background: #f00;  float: left;  width: 20px;}#content {  background: #fff;    float:left;}#rightcol {  background: #f00;  float: right;  width: 20px;  }--></style></head><body><div id="leftcol">L</div><div id="content">Content</div><div id="rightcol">R</div></body></html>
Moving you to Web Development for this one. [smile]

- Jason Astle-Adams

What I usually do is create one broad background to go into the body instead of making to separate pillars. This might not be the best solution, but it has worked well for my needs.
-----------------------------Play IndestructoTank on Bubbleshooter.hk

This topic is closed to new replies.

Advertisement