Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

CSS Border - How To Combine ?

Ads
banner
banner
banner
letsplay Offline referral

Posts: 274
Joined: Jul 2013
Reputation: 1

#1
Senior Member
Sorry for such a basic CSS question, I use this CSS style to make my border width 1px but how I combine these into one line?

PHP Code:
border-top1px;
border-right1px;
border-bottom1px;
border-left1px

Thanks
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

#2
Posting Freak
I am afraid there is no way set them all in a single statement. If you want to add border around the entire div then use this style:

Code:
border: 1px solid #000000;

Your css is missing solid and color property.

Code:
border-top: 1px solid #000000;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
border-left: 1px solid #000000;

You can always use only one border style!!!!
maya Offline referral

Posts: 1,058
Joined: May 2013
Reputation: 34

#3
Posting Freak
You can combine width border-style values in to one line:
Code:
border-top: #000000;
border-right: #000000;
border-bottom: #000000;
border-left: #000000;

Code:
border-width: 2px 0 2px 0;
or
Code:
border-width: 2px 0;

You can do the same with box-lines property!
Code:
border-style: solid dashed solid dashed;

More css line properties!

outset
inset
inset
groove
double
solid
dashed
dotted
destroyer Offline referral

Posts: 430
Joined: Jul 2013
Reputation: 3

#4
Senior Member
Thanks this is very helpful for me as I am only starting to learn HTML and CSS





User(s) browsing this thread: 1 Guest(s)