|
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.
|
|
|
|
|
|
Be more clear as to what you are trying to achieve.
"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'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
|
|
|
|
|
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
"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.
|
|
|
|
|
Mohammad Dayyan wrote: I'm in hurry
Missing the part where that's my problem
Mohammad Dayyan wrote: Please do it
Ummmmm........no
"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
|
|
|
|
|
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;
}
|
|
|
|
|
|
Hi there guys.
I have a CSS file and a HTML file (HTML created by smarty)
I want to the css file load on browser earlier than HTML file.
Can we do it ?
|
|
|
|
|
Mohammad Dayyan wrote: I want to the css file load on browser earlier than HTML file.
Why?
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
In order for the CSS file to load, it must be linked to (by an HTML file). So the answer is no - you can't really do it.
The only way you could achieve a similar result is by pre-loading the CSS somehow, but there's not really much to be gained by doing this in most situations.
Just put the CSS link toward the top of the page, and let the browser get it when it wants it. If you're having problems with the speed, try debugging it using firefox with the YSlow plugin. It gives you a lot of information about the structure of your page, and potential bottlenecks.
|
|
|
|
|
Hi all,
I need to validate textboxes run at server in asp.Net but using javascript, exactly using getElementbyId Function in javaScript, How I can do this. Please any body help.
Regards all
|
|
|
|
|
|
if we are using same js file from different asp.net pages.what are different ways to persist javascript global variables through different asp.net pages.
|
|
|
|
|
Could you pass them through the URL of the pages?
--Perspx
"When programming in Visual Basic, you can always know whether a given program will become stuck in a loop and never halt. The answer is 'yes'." - Uncyclopedia
|
|
|
|
|
The entire JS environment goes away (well, mostly) when a new page is loaded. So you must manually save the values somewhere and restore them. You could use cookies to store a limited amount of information client-side, you could post it back to the server (possibly using AJAX if the user would otherwise not be posting anything) and store it somewhere there and then send it back down encoded in any new page requests, or as Perspx suggests you could encode it and modify all URLs on the first page to contain the encoded information, then parse it out again when the destination loads. There are a few other techniques for local storage - you can find a short discussion of them here: http://www.niallkennedy.com/blog/2007/01/ajax-performance-local-storage.html[^]
Generally speaking though, "persisting global variables" is the wrong way to think about it. When writing JS, you should always consider the environment as transient, limited to the current page. Anything that needs to persist should be saved explicitly in your code, and the technique for doing so should be a fundamental part of your design since it will affect the user experience. Generally, you should try to minimize the amount of persistance necessary - the more pages stand alone, the easier they are to test and debug, and the better they'll work with users' bookmarks, navigation, etc.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
But my problem is that neither can i use cookies nor can i post my data in ecrypted form to server through ajax call and need to be persisted in js variable through three different ajax pages.Can you suggest any other trick?
|
|
|
|
|
I suggested two, echoed Perspx for my third suggestion, and linked to several other techniques. I also put in some effort to give you an understanding of why what you seem to seek is fundamentally flawed. What more do you want?
rajivkalra1982 wrote: Can you suggest any other trick?
Sure. Give up on making web pages and use Flash or Silverlight. That's a trick, a dirty one, and your users will suffer for your trickery.
Or, read what i wrote, explain what you're actually trying to do, and ask an honest question. Taking some time to understand the systems you hope to build on, rather than making wildly inaccurate assumptions, wouldn't hurt either.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
|
It's just that your editor is using a unicode BOM character to specify the file's encoding. It's perfectly valid, but older software/browsers that don't properly work with unicode may not like it. UTF-8 encoding doesn't need the byte order thing really as it's part of its specification that it's fixed order. Unicode can be an awkward beast to master, but tools are getting better.
If you're getting problems with it, try re-editing the file in another text editor to see if it trims out the code.
More details: http://en.wikipedia.org/wiki/Byte_Order_Mark[^]
By the look of that it seems that there's some interaction with PHP that you may need to be aware of.
|
|
|
|