Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830
this week in the
Programmer Certification
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
HTML Pages with CSS and JavaScript
CSS depending variables
manuel aldana
Ranch Hand
Posts: 308
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
aldana software engineering blog & .more
manuel aldana
Ranch Hand
Posts: 308
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
aldana software engineering blog & .more
Eric Pascarello
author
Posts: 15385
6
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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!
aldana software engineering blog & .more
This tiny ad will self destruct in five seconds.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Dynamically changing class attribute of TD without Scriptlet
consistent font size across the project?
Wrapping of select box
Display jsp based on user agent
Centering a column heading in a datatable
More...