How can I combine this CSS code ?
-
I'm so sorry for my English. I'm new. I'd like to reduce above css code. For example we can write
background: #746c5e url('image/body.jpg') repeat-y center;
instead of
background-image: url('image/body.jpg');
background-repeat: repeat-y;
background-position: center;Do you understand what I mean ?
Well, what is wrong with the original?
background-image: url('image/body.jpg');
background-repeat: repeat-y;
background-position: center;"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Well, what is wrong with the original?
background-image: url('image/body.jpg');
background-repeat: repeat-y;
background-position: center;"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
I want to reduce this code like that : Can you ?
css_class1{
background-color: #988F81;
border-top-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-left-style: solid;
border-top-color: #F6F5F2;
border-left-color: #F6F5F2;
border-right-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-right-color: #333333;
border-bottom-color: #333333;
color: #000000;
} -
I want to reduce this code like that : Can you ?
css_class1{
background-color: #988F81;
border-top-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-left-style: solid;
border-top-color: #F6F5F2;
border-left-color: #F6F5F2;
border-right-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-right-color: #333333;
border-bottom-color: #333333;
color: #000000;
} -
I want to reduce this code like that : Can you ?
css_class1{
background-color: #988F81;
border-top-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-left-style: solid;
border-top-color: #F6F5F2;
border-left-color: #F6F5F2;
border-right-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-right-color: #333333;
border-bottom-color: #333333;
color: #000000;
}Mohammad Dayyan wrote:
Can you ?
Sure, but can you? No point in me doing it for you (no financial reward for me) when you should be the one learning how to do it ;P
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Mohammad Dayyan wrote:
Can you ?
Sure, but can you? No point in me doing it for you (no financial reward for me) when you should be the one learning how to do it ;P
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
Hey Paul . Actually I can't. I'm in hurry and if you can Please do it. :-O
-
Hey Paul . Actually I can't. I'm in hurry and if you can Please do it. :-O
Mohammad Dayyan wrote:
I'm in hurry
Missing the part where that's my problem :|
Mohammad Dayyan wrote:
Please do it
Ummmmm........no ;P
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Mohammad Dayyan wrote:
I'm in hurry
Missing the part where that's my problem :|
Mohammad Dayyan wrote:
Please do it
Ummmmm........no ;P
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
:laugh: However thanks my friend
-
What do you mean when you say that you want to "combine" the code? Usually you combine something with something else, so what do you want to combine it with?
Despite everything, the person most likely to be fooling you next is yourself.
I'm so sorry for my English. I'm new. I'd like to reduce above css code. For example we can write
background: #746c5e url('image/body.jpg') repeat-y center;
instead of
background-image: url('image/body.jpg');
background-repeat: repeat-y;
background-position: center;Do you understand what I mean ? I want to reduce this code like that :
css_class1{
background-color: #988F81;
border-top-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-left-style: solid;
border-top-color: #F6F5F2;
border-left-color: #F6F5F2;
border-right-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-right-color: #333333;
border-bottom-color: #333333;
color: #000000;
} -
I'm so sorry for my English. I'm new. I'd like to reduce above css code. For example we can write
background: #746c5e url('image/body.jpg') repeat-y center;
instead of
background-image: url('image/body.jpg');
background-repeat: repeat-y;
background-position: center;Do you understand what I mean ? I want to reduce this code like that :
css_class1{
background-color: #988F81;
border-top-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-left-style: solid;
border-top-color: #F6F5F2;
border-left-color: #F6F5F2;
border-right-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-right-color: #333333;
border-bottom-color: #333333;
color: #000000;
}I see. Like this:
css_class1{
background-color: #988F81;
border-top: 1px solid #F6F5F2;
border-left: 1px solid #F6F5F2;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
color: #000000;
}or like this:
css_class1{
background-color: #988F81;
border: 1px solid;
border-color: #F6F5F2 #333333 #333333 #F6F5F2;
color: #000000;
}Despite everything, the person most likely to be fooling you next is yourself.
-
:laugh: However thanks my friend
What you need to be doing is looking at the code, and seeing what you're duplicating. Pull out the common elements, and then see what you have left. Try something like: .css_class1{ background-color: #988F81; color: #000000; border: solid 1px #F6F5F2; border-right-color: #333333; border-bottom-color #333333; } There's further improvements that can be made, but that's a start. In fact, since you seem to be trying to get a 3d effect on the edges of the border, you could try replacing it with "border-style: inset", or "border style: outset", which probably won't display identically to your first sample, but is a standard style with shorter markup. eg: .css_class1{ background-color: #988F81; color: #000000; border-style: outset; }
-
What you need to be doing is looking at the code, and seeing what you're duplicating. Pull out the common elements, and then see what you have left. Try something like: .css_class1{ background-color: #988F81; color: #000000; border: solid 1px #F6F5F2; border-right-color: #333333; border-bottom-color #333333; } There's further improvements that can be made, but that's a start. In fact, since you seem to be trying to get a 3d effect on the edges of the border, you could try replacing it with "border-style: inset", or "border style: outset", which probably won't display identically to your first sample, but is a standard style with shorter markup. eg: .css_class1{ background-color: #988F81; color: #000000; border-style: outset; }
Than you very much
-
I see. Like this:
css_class1{
background-color: #988F81;
border-top: 1px solid #F6F5F2;
border-left: 1px solid #F6F5F2;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
color: #000000;
}or like this:
css_class1{
background-color: #988F81;
border: 1px solid;
border-color: #F6F5F2 #333333 #333333 #F6F5F2;
color: #000000;
}Despite everything, the person most likely to be fooling you next is yourself.
Thank you Guffa