Here is what I have...everything works except the entire top border does not. I have tried it this way and also border-top-image:...Does anyone have any ideas!? thanks!

<style>
.about {
font-family:"BankGothic Md BT";
font-size:12px;
border-right:1px solid #FB9709;
border-left:1px solid #FB9709;
border-bottom:1px solid #FB9709;
border-top: 1px solid #FB9709 url('tab.gif');
text-align:left;
word-wrap : sWrap;
width:275px;
background: #fff;
}
</style>

Recommended Answers

All 9 Replies

you can't use images as borders.
use a background image set to tile across the top instead.
background: url('tab.gif') 0 0 repeat-x;

As Dave said, borders can't be images.

So, open the image that you want up there in your graphics program and at the top add the "1px #FB9709" line to the image.

Then use this:

.about {
width: 275px;
background: #FFF url('tab.gif') no-repeat top;
font: "BankGothic Md BT", Arial, sans-serif;
border: 1px solid #FB9709;
border-top: none;
text-align:left;
word-wrap : sWrap;
}

That should do it :)

oops, double post.
sorry.

I'm lost... why not leave the border off the image and just let it go all the way round?

I'm lost... why not leave the border off the image and just let it go all the way round?

Not sure who you were addressing, and really not sure what you are asking either, LOL.

Yeah I was sort of replying to you. When you said:

open the image that you want up there in your graphics program and at the top add the "1px #FB9709" line to the image.

I took it to mean putting the border directly onto the image, and then the css blanks off the css top border.

I just wondered why go to those lengths when all you have to do is leave the image intact and put the top border across it using CSS...

Maybe not?

Alright, thanks!

I just wondered why go to those lengths when all you have to do is leave the image intact and put the top border across it using CSS...

Maybe not?

Well, depends on the image... if the image that needs a top border is not the same width as the container box (ie less width), then the border would extend beyond the left and right of the image :)

Hard to say without seeing the image ;)

Was worth a try to post !

Member Avatar for feoperro

Well, let's say you wanted a border to be 300px width, 1px height, black, solid. then in the same horizontal axis, on the same border, 100px width, 1px height, white, solid - then again: 100px width, 1px height, black, solid.

Now you have a border that "changes" - an image would be easiest instead of writing a huge piece of code. I can see how border-image would come in handy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.