Design all 'pre' tags inside a div in css
How do i style the width of all "pre" tags inside a div with some id ? I can't put the "class" attribute inside the 开发者_开发百科pre tag, becouse the pre tag is written by a function that i have no access to it.
CSS
#parent {} /* add style to the parent element */
#parent pre {color: red} /* to the pre */
HTML
<div id="parent">
<pre>aaa</pre>
</div>
like this???
div#id pre { styles here }
Use this selector div#someId pre
...............
div#someId pre
{
width: ...
}
精彩评论