Click to See Complete Forum and Search --> : margin image borders???


mallinanga
03-09-2003, 03:50 PM
hi html gurus!!!

i have a problem...

is there a way to define margins to have a gif as border???

to be more specific i want a gif-border at the right side of the left margin...a left gif border at the right margin etc etc...

if not...how can i define the simple borders???

thank you all in advance!

Geat
03-09-2003, 04:16 PM
I guess one option would be to stick everything in a table and have a very thin table column with your background image, as a border...

mallinanga
03-09-2003, 04:35 PM
yeap!

though about it...it can be easily done...
- when you have 10-20 files at your website...

but unfortunately my php page consists of 500+ files...

is there a way to do the exact same thing with margins???

dosn't matter if it's in the css or in a .html file...

i just want to get it done :)

thanks for your answer...

khalidali63
03-09-2003, 05:02 PM
if you set margins in css for any number of files and import that file in all of the pages you can do this.

e.g
here is a class definition in style sheets if you use this class in any number of files it will set the style.


<style type="text/css">
.imvr {
border-top-width:10px;
border-bottom-width:10px;
border-right-width:0px;
border-left-width:0px;
border-style: outset;
border-color:#93BEE2;
margin-top:0px;
margin-bottom:0px;
margin-right:0px;
margin-left:0px;
padding-top:0px;
padding-bottom:0px;
padding-right:0px;
padding-left:0px;
}
</style>


and then in the page something like this

<img class="imvr" src="images/flake.gif" alt=""/>

Hope thats what you wanted..

Khalid

mallinanga
03-10-2003, 07:59 AM
hi khalid

well that didn't do it...

see here is how it is right now :

<body topmargin="20" bottommargin="20" rightmargin="40" leftmargin="40">

isn't there a way to have a border for this margins?... (forget about the gif 4 now :) )

ps. ...oh well... maybe it's better to find the file where the tables are defined! :(

nkaisare
03-10-2003, 12:59 PM
Originally posted by mallinanga
<body topmargin="20" bottommargin="20" rightmargin="40" leftmargin="40">

For cross browser compatibility, you ought to use
<body style="margin: 20px 40px;">
This will give top and bottom margins of 20px and left and right margins of 40px.

Moreover, you can specify borders:
<body style="margin: 20px 40px; border: 10px dotted navy">
For more info on borders you can visit:
http://www.w3schools.com/css/css_reference.asp#border

As of now, you can't specify a gif for border.

nkaisare
03-10-2003, 01:04 PM
Probably you can try this
<body style="margin: 40px 60px">
<!-- Your original page contents here -->
...
...
<div style="position: absolute; left: 40px; top: 20px"><img src="left.gif" alt=""></div>
<div style="position: absolute; left: 40px; top: 20px"><img src="top.gif" alt=""></div>
<div style="position: absolute; right: 60px; top: 20px"><img src="right.gif" alt=""></div>
<div style="position: absolute; left: 40px; bottom: 40px"><img src="bottom.gif" alt=""></div>
</body>