• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSS depending variables

 
manuel aldana
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

is it possible to do this somehow in CSS:

#bla{
width: 500px;
}

.center-of-bla{
margin-left: #bla.width/2; //pseudo-code
}

thank you.
 
manuel aldana
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one question more i forgot to ask:

is it possible to put the align flag of <div align="center> into as CSS statement so it is possible to just write <div class="align-center">?
or is it impossible to outsource attributes of the <div>-tag?

thanks again.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you can search google for "CSS expression" and you can see how IE would allow you to do it.

and I think you are looking for text-align: center;

Eric
 
manuel aldana
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i think i will definetely not use proprietary extensions. thanks anyway.

what about my 2nd question: putting this align="center" attribute into a css-class? is that possible?

thanks again!
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic