Click here to Skip to main content
16,010,553 members
Home / Discussions / Web Development
   

Web Development

 
Questionnow how stupid is this? Pin
leppie8-Oct-02 15:22
leppie8-Oct-02 15:22 
AnswerRe: now how stupid is this? Pin
Paul Watson8-Oct-02 21:21
sitebuilderPaul Watson8-Oct-02 21:21 
GeneralRe: now how stupid is this? Pin
leppie9-Oct-02 2:03
leppie9-Oct-02 2:03 
AnswerRe: now how stupid is this? Pin
Paul Riley9-Oct-02 0:42
Paul Riley9-Oct-02 0:42 
GeneralNew to ASP.NET Pin
Thorlin8-Oct-02 11:27
Thorlin8-Oct-02 11:27 
GeneralRe: New to ASP.NET Pin
Paul Riley8-Oct-02 14:28
Paul Riley8-Oct-02 14:28 
GeneralCSS Simplification Pin
leppie8-Oct-02 5:22
leppie8-Oct-02 5:22 
GeneralRe: CSS Simplification Pin
Paul Watson8-Oct-02 6:26
sitebuilderPaul Watson8-Oct-02 6:26 
leppie wrote:
Hi all, how can I simplify this?

Couple ways in fact. Probably the best way is this:

.ThreadEnd, .ThreadNormal
{
	border-right: #ff9966 1px solid;
	padding-right: 3px;
	border-top: #ff9966 1px solid;
	padding-left: 3px;
	padding-bottom: 3px;
	border-left: #ff9966 1px solid;
	padding-top: 0px;
	background-color: #ffffcc;
}
.ThreadEnd
{
	border-bottom: #ff9966 1px solid;
}
.ThreadNormal
{
	border-bottom: #ff9966 1px;
}


You can define more than one CSS class at a time using the comma (,).

Also you can then re-define classes later on in the CSS file. In fact you can re-define as many times as you want, and any non-specified attribute will not be overwritten.

The other way is:
.Thread
{
	border-right: #ff9966 1px solid;
	padding-right: 3px;
	border-top: #ff9966 1px solid;
	padding-left: 3px;
	padding-bottom: 3px;
	border-left: #ff9966 1px solid;
	padding-top: 0px;
	background-color: #ffffcc;
}
.ThreadEnd
{
	border-bottom: #ff9966 1px solid;
}
.ThreadNormal
{
	border-bottom: #ff9966 1px;
}


and then in your HTML:
<div class="Thread ThreadNormal">still not the end, sigh</div>
<div class="Thread ThreadEnd">the end is nigh!</div>


As you can see you can specify more than one class at a time in an HTML element. It is actually a good thing too, not just a hack.

Paul Watson
Bluegrass
Cape Town, South Africa

GeneralRe: CSS Simplification Pin
leppie8-Oct-02 7:34
leppie8-Oct-02 7:34 
GeneralFormsAuthentication Pin
Mazdak8-Oct-02 4:32
Mazdak8-Oct-02 4:32 
GeneralRe: FormsAuthentication Pin
Paul Riley8-Oct-02 14:32
Paul Riley8-Oct-02 14:32 
GeneralWeb.Config Help. Pin
Jason Weibel8-Oct-02 1:43
Jason Weibel8-Oct-02 1:43 
GeneralRe: Web.Config Help. Pin
Paul Watson8-Oct-02 5:05
sitebuilderPaul Watson8-Oct-02 5:05 
GeneralRe: Web.Config Help. Pin
Ray Cassick8-Oct-02 8:25
Ray Cassick8-Oct-02 8:25 
GeneralRe: Web.Config Help. Pin
Jason Weibel8-Oct-02 9:29
Jason Weibel8-Oct-02 9:29 
GeneralRe: Web.Config Help. Pin
Paul Watson8-Oct-02 21:12
sitebuilderPaul Watson8-Oct-02 21:12 
GeneralRe: Web.Config Help. (web.config is an XML file) Pin
Paul Watson8-Oct-02 20:58
sitebuilderPaul Watson8-Oct-02 20:58 
GeneralASP - extract links Pin
Garth7-Oct-02 15:58
Garth7-Oct-02 15:58 
GeneralOS Asking for software to open file Pin
Pradhip7-Oct-02 13:55
Pradhip7-Oct-02 13:55 
GeneralRe: OS Asking for software to open file Pin
leppie7-Oct-02 14:12
leppie7-Oct-02 14:12 
QuestionHow to reference a file containing JavaScript in HTML Pin
leppie7-Oct-02 12:53
leppie7-Oct-02 12:53 
AnswerSolved again Pin
leppie7-Oct-02 14:05
leppie7-Oct-02 14:05 
GeneralHere's an easy one for you Pin
Robby7-Oct-02 11:30
Robby7-Oct-02 11:30 
GeneralPassing string in JavaScript Pin
leppie7-Oct-02 11:16
leppie7-Oct-02 11:16 
GeneralSOlved Pin
leppie7-Oct-02 12:33
leppie7-Oct-02 12:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.