html - how to style xml tag attribute with css -


i'm trying give style xml file displayed page, far manage give style "start" attribute of tag, need style 2 more attributes: "end" , "n".

currently have:

css:

#mtxt tok { font-size: 14pt; } #mtxt u { display: block; text-decoration: none; margin-bottom: 10px; } #mtxt u:before { content: attr(start); color: #999900; padding-right: 30px; font-size: 9pt; } #mtxt l { display: block; } 

xml:

<u n="1" start="00:00:23,912" end="00:00:26,540" id="u-1"> <tok id="w-1">now we're reading letter of st. paul</tok> </u> 

visualization: (kind of, see more or less result)

00:00:23,912 : now we're reading letter of st. paul

the visualization i'm trying next one:

1) 00:00:23,912 - 00:00:26,540 : now we're reading letter of st. paul

any suggestions... thanks

something this? demo

css

u:before {   content: attr(n) ') ' attr(start) ' - ' attr(end);   color: #999900;   padding-right: 30px;   font-size: 9pt; } 

you can have multiple attr() inside. add space inbetween. add text, wrap in quotes.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -