I have some text with text-align: justify;
the property is inherited in links and other nested inline elements in that text. I want to set other text-align mode to some of them, for example text-align: center;
, but I cannot. Firebug shows that the parent style is overridden, but the nested inline element is still justified. I observed that strange behavior in many different browsers and obviously they are doing this by spec? Is that really by design? How to work around it?
EDIT: Some example code. The span with ID=span1 cannot define its own text align. It should be right aligned, but it is centered instead. While I was experimenting I noticed that inline elements cannot define any text alignment at all. Very strange.
<html>
<head>
<style type="text/css">
#cubic { width: 495px; height: 200px; background-color: green; text-align: center}
#span1 {text-align: right; color: red}
</style>
</head>
<body>
<p id="cubic">
<span id="span1">This is span 1</span>
</p>
</body>
</html>