Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Design and HTML
Reload this Page Is it possible to have a CSS image as border on the bottom AND top?
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
Member
Str8 is on a distinguished road
 
Posts: 85
Join Date: Aug 2011
Exclamation Is it possible to have a CSS image as border on the bottom AND top? - 11-01-2011, 06:15 AM

I want to use an image as a border (which is pretty much a dot repeated) and I want to put this on the bottom and top border on my menu.

Right now it either shows on the top OR the bottom, but I cannot figure out how to get both.

I have tried:
Code:
#menu a {
	display: block;
	float: left;
	height: 25px;
	padding: 9px 30px 0 40px;
        background: url(images/img5.gif) repeat-x top, bottom;
        text-decoration: none;
	text-transform: uppercase;
	font-size: 12px;
	color: #656973;
        
}
Code:
#menu a {
	display: block;
	float: left;
	height: 25px;
	padding: 9px 30px 0 40px;
        background: url(images/img5.gif) repeat-x bottom;
        background: url(images/img5.gif) repeat-x top;
        text-decoration: none;
	text-transform: uppercase;
	font-size: 12px;
	color: #656973;
        
}
Is this even possible, I think im about to punch my computer screen :\
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 6,515
Join Date: Jul 2009
Location: Spain
Default 11-01-2011, 08:50 AM

Hi,

I think it is possible.

Web w3schools.
Section Background Image - Set position and no-repeat
Code:
#menu a{
        background-image:url('images(img5.gif');
        background-position: bottom top;
	display: block;
	float: left;
	height: 25px;
	padding: 9px 30px 0 40px;
        text-decoration: none;
	text-transform: uppercase;
	font-size: 12px;
	color: #656973;
}


Recuerda realizar copias de seguridad de tus sitios web. Si este mensaje te ayudó puedes pulsar sobre el botón karma
Reply With Quote
(#3 (permalink))
Old
CSS_Man's Avatar
Senior Member
CSS_Man is on a distinguished road
 
Posts: 2,932
Join Date: Jun 2010
Location: Earth
Default 11-01-2011, 07:35 PM

Google border-image. Its part of css3 but it works in firefox chrome ie9 and probably safari as well.



Feel free to PM me for help
If someone has helped you please spread some karma
Reply With Quote
(#4 (permalink))
Old
lobrc's Avatar
Administrator
lobrc is on a distinguished road
 
Posts: 5,037
Join Date: Jan 2010
Location: http://www.lobrc.net
Default 11-01-2011, 08:12 PM

@OP, You do know you can create dashed borders with just CSS?


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#5 (permalink))
Old
robh's Avatar
Senior Member
robh is on a distinguished road
 
Posts: 300
Join Date: Oct 2009
Default 11-01-2011, 09:17 PM

An example taken from one of my site css. If this helps.

This example shows the top border only 1px dashed. Adjust to your own need.

Code:
.menu_two { /* used only in tpl_main.php */
    border-width: 1px 0 0 0; /* see note below */
    border-style: dashed;
    background-color:  #000000;
}

/*===================================================
here, the 'border-width:' controls all four sides of the table independently,
using '1px 0 0 0. Simply adjust the zero values to reflect which side/s YOU
need.

Cuts down on typing, also :D
===================================================*/

Rob


?selcatceps ym era erehW
find \( -name "new_spectacles" -o -name "spare_spectacles" \) -a -atime -30 -exec mv {} /home/robh/Desktop/spectacles \;
Reply With Quote
(#6 (permalink))
Old
bubt's Avatar
Member
bubt is on a distinguished road
 
Posts: 47
Join Date: Sep 2009
Default 11-08-2011, 06:24 PM

Try this:

Code:
.menu {
     border: 1px dotted #000;
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com