[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

08/20/2009 at 09:55AM PDT, ID: 24668847
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

How to reduce CSS

Asked by NorthDorsetWeb in Cascading Style Sheets (CSS)

Hi there - i was hoping someone could help me with the my code.    I have found some code for imageless text borders using CSS.  

I began by setting one up and have now found that I need to set up some styles for a number of different colours for instance - one blue class, one red, one green, one yellow etc.

I have started to do this but it seems to be getting complicated.  

Within the Text box left and right you see there are coloured headings.

I was going to start dupicating textbordr for each coloured heading I want and then each  border  oxb2 and rxb2  etc.... but is there anyway I can simplify this code?    

Many thanks

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
/* ============================= text boxes ============================= */
/* ======== text box left ======== */
.textbordl {width: 25em; float: left;}
.textbordl h1, .textbord h2, .textbord p {margin:0}
.textbordl h1 {font-size:1.2em; color: orange;}
.textbordl h2 {font-size:1em; color:#234; border:0;}
.textbordl p {padding-bottom:0.5em; color:#003366; padding-left:10px;}
.textbordl h2 {padding-top:0.5em; padding-left:10px;}
.textbordl {background: transparent; margin:1em;}
 
.textbordl em {display:block; width:0; height:0; color:#d8d8ee; overflow:hidden; border-top:12px solid #abc; border-left:12px dotted transparent; border-right:12px dotted transparent; margin-left:50px;}
 
/* hack for IE5.5 */
 
* html .textbordl em {width:24px; height:12px; w\idth:0; hei\ght:0;}
.textbordl span {display:block; width:0; height:0; color:#abc; overflow:hidden; border-top:10px solid #fff; border-left:10px dotted transparent; border-right:10px dotted transparent; margin-left:52px; margin-top:-15px;}
* html .textbordl span {width:20px; height:10px; w\idth:0; hei\ght:0;}
 
/* ======== text box right ======== */
.textbordr {width: 25em; float: right;}
.textbordr h1, .textbord h2, .textbord p {margin:0}
.textbordr h1 {font-size:1.2em; color:#fc0;}
.textbordr h2 {font-size:1em; color:#234; border:0;}
.textbordr p {padding-bottom:0.5em; color:#003366; padding-left:10px;}
.textbordr h2 {padding-top:0.5em; padding-left:10px;}
.textbordr {background: transparent; margin:1em;}
 
.textbordr em {display:block; width:0; height:0; color:#d8d8ee; overflow:hidden; border-top:12px solid #abc; border-left:12px dotted transparent; border-right:12px dotted transparent; margin-left:50px;}
 
/* hack for IE5.5 */
 
* html .textbordr em {width:24px; height:12px; w\idth:0; hei\ght:0;}
.textbordr span {display:block; width:0; height:0; color:#abc; overflow:hidden; border-top:10px solid #fff; border-left:10px dotted transparent; border-right:10px dotted transparent; margin-left:52px; margin-top:-15px;}
* html .textbordr span {width:20px; height:10px; w\idth:0; hei\ght:0;}
 
/* ======== orange borders ======== */
 
.oxb1, .oxb2, .oxb3, .oxb4, .oxb5, .oxb6, .oxb7 {display:block; overflow:hidden; font-size:0;}
.oxb1, .oxb2, .oxb3, .oxb4, .oxb5, .oxb6 {height:1px;}
.oxb4, .oxb5, .oxb6, .oxb7 {background:#ccc; border-left:1px solid #FF6600; border-right:1px solid #FF6600;}  /* the corners  */
 
.oxb1 {margin:0 8px; background:#FF6600;}
.oxb2 {margin:0 6px; background:#FF6600;}
.oxb3 {margin:0 4px; background:#FF6600;}   
 
/* these bits are the internal rows that give shape do not change unless changing colour of background */
.oxb4 {margin:0 3px; background:#fff; border-width:0 5px;} 
.oxb5 {margin:0 2px; background:#fff; border-width:0 4px;}
.oxb6 {margin:0 2px; background:#fff; border-width:0 3px;}
.oxb7 {margin:0 1px; background:#fff; border-width:0 3px; height:2px;}
 
.orangetextbordcontent {display:block; background:#fff; border:3px solid #FF6600; border-width:0 3px;} /* makes up sides */
 
/* ======== red borders ======== */
 
.rxb1, .rxb2, .rxb3, .rxb4, .rxb5, .rxb6, .rxb7 {display:block; overflow:hidden; font-size:0;}
.rxb1, .rxb2, .rxb3, .rxb4, .rxb5, .rxb6 {height:1px;}
.rxb4, .rxb5, .rxb6, .rxb7 {background:#ccc; border-left:1px solid #FF9999; border-right:1px solid #FF9999;}  /* the corners  */
 
.rxb1 {margin:0 8px; background:#FF9999;}
.rxb2 {margin:0 6px; background:#FF9999;}
.rxb3 {margin:0 4px; background:#FF9999;}   
 
/* these bits are the internal rows that give shape do not change unless changing colour of background */
.rxb4 {margin:0 3px; background:#fff; border-width:0 5px;} 
.rxb5 {margin:0 2px; background:#fff; border-width:0 4px;}
.rxb6 {margin:0 2px; background:#fff; border-width:0 3px;}
.rxb7 {margin:0 1px; background:#fff; border-width:0 3px; height:2px;}
 
.redtextbordcontent {display:block; background:#fff; border:3px solid #FF9999; border-width:0 3px;} /* makes up sides */
[+][-]08/20/09 10:25 AM, ID: 25145010

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/09 11:51 AM, ID: 25145856

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/09 11:55 AM, ID: 25145885

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/09 04:09 PM, ID: 25147910

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/21/09 04:50 AM, ID: 25150786

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 06:01 AM, ID: 25151331

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/21/09 06:38 AM, ID: 25151659

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 06:52 AM, ID: 25151773

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/21/09 07:13 AM, ID: 25151978

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cascading Style Sheets (CSS)
Sign Up Now!
Solution Provided By: flob9
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08/21/09 07:52 AM, ID: 25152418

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/21/09 08:08 AM, ID: 25152626

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 09:01 AM, ID: 25153199

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/21/09 09:35 AM, ID: 25153490

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 12:10 PM, ID: 25154854

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625