Why can't you use numbers in CSS and is there another way of doing the job? I have the following code:  &lt;div class="center 400-width" id="position"&gt;     &lt;div class="" id="header"&gt;         Header     &lt;/div&gt;     &lt;div class="" id="content"&gt;         Content     &lt;/div&gt;     &lt;div class="" id="footer"&gt;         Footer     &lt;/div&gt; &lt;/div&gt;   The CSS selects the class 400-width which means the container gets a width of 400px. And the background-color is for checking if it's true.  .400-width{     width:400px;     background-color:blue;     color:white; }   It doesn't happen right now as you can see   I solved the problem by replacing 400- by four. So it becomes fourwidth.
12151
What characters/symbols are allowed within the CSS class selectors? I know that the following characters are invalid, but what characters are valid?  ~ ! @ $ % ^ &amp; * ( ) + = , . / ' ; : " ? &gt; &lt; [ ] \ { } | ` #
116083
I tried to use a header and footer layout I found here on this website. But I have some problems with changing the code to what I want. I want the pagenumbering to be like page x of y in the footer. It would be nice with this layout (just with page x of y instead of just page x):  \cfoot{\parbox{\textwidth}{\hrulefill\kern-0.6ex\raisebox{-0.5ex}{$\Bigl[$\makebox[2em][c]{\thepage}$\Bigr]$}\kern-0.5ex\hrulefill}}   But the pagenumbering is in the header and there aren't a space between the letters and the numbers as you can see in my minimal work example:  \documentclass[12pt,a4paper]{book}%generelt \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} % clear all headers and footers \renewcommand{\headrulewidth}{0pt} % remove rule between header and text \fancyhead[LE, RO]{\thepage of \pageref{LastPage}} % put page number in left header on even pages,                             % right header on odd pages \fancyhead[RE]{\nouppercase{\leftmark}} % remove uppercase on chapter title \renewcommand{\chaptermark}[1]{\markboth{#1}{}} % remove "Chapter N." prefi \usepackage{lastpage}   Another problem is that I would like to have a chapter numbering in the header. The design is really nice, but I would like to have the chapter number too, just like "CHAnumber| name of the chapter".  Is it possible to make this two changes? And how? Thank you very much for help!
13314
I'm looking for a way to insert a &lt;style&gt; tag into an HTML page with JavaScript.  The best way I found so far:  var divNode = document.createElement("div"); divNode.innerHTML = "&lt;br&gt;&lt;style&gt;h1 { background: red; }&lt;/style&gt;"; document.body.appendChild(divNode);   This works in Firefox, Opera and Internet Explorer but not in Google Chrome. Also it's a bit ugly with the &lt;br&gt; in front for IE.  Does anyone know of a way to create a &lt;style&gt; tag that   Is nicer Works with Chrome?   Or maybe   This is a non-standard thing I should avoid Three working browsers are great and who uses Chrome anyway?
120595
I'm having this problem, same as ever, but never try to find the right solution  code:   &lt;div id="ListOfTextAndPhotos"&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo.jpg" style="float: left"&gt;           Some text about the photo       &lt;/div&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo2.jpg" style="float: left"&gt;           Some text about the photo2       &lt;/div&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo3.jpg" style="float: left"&gt;           Some text about the photo3       &lt;/div&gt;   &lt;/div&gt;   Question: How do I to keep the photo inside the DIV? with the separator line under the photo
99003
I'm having a problem placing footers on my document. On the first page it shows ok, but in the next pages it doesn't show at all. A bit of thinkering made me realize that the footer was indeed appearing, but out of page boundaries, so it wasn't visible. So the question is, how can I fix the height at which the footer is expected to appear? my code (part of it) is as follows:  \documentclass[10pt,letterpaper]{article} ....... \usepackage[margin=4.5cm,headheight=28pt]{geometry} \usepackage{fancyhdr} ....... \hoffset-2.8cm \voffset-2.3cm \setlength{\textwidth}{18cm} \setlength{\textheight}{22.5cm} \renewcommand{\baselinestretch}{1.2}  \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{1pt} %\renewcommand{\footrulewidth}{0.3pt} \fancyhead[C]{     \hspace*{-1cm}\begin{tabular}{&gt;{\centering\arraybackslash}p{3cm}b{12cm}&gt;{\centering\arraybackslash}p{3cm}}         % &amp; \\[0.05ex]         \hspace*{0.5cm}\includegraphics[width=2.5cm]{logo.png} &amp; \hspace*{-2.5cm} Some random text I need... &amp; \includegraphics[width=3cm]{LogoONAC.png} \\     \end{tabular}    } \fancyfoot[C]{ - Some text I need to appear as footer on every page - }   Thanks in advance!  EDIT:  Ok, so I've reproduced my problem as suggested by Werner. The code is as follows:  \documentclass{article}  \usepackage[margin=1.5cm,headheight=10pt]{geometry} \usepackage{fancyhdr,graphicx} \usepackage{lipsum} \usepackage{array}  \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{1pt} \fancyhead[C]{     \hspace*{-1cm}\begin{tabular}{&gt;{\centering\arraybackslash}p{3cm}b{12cm}&gt;{\centering\arraybackslash}p{3cm}}         % &amp; \\[0.05ex]         \hspace*{0.5cm}\includegraphics[width=2.5cm]{logo.png} &amp; \hspace*{-2.5cm}\begin{tabular}{&gt;{\centering\arraybackslash}b{17cm}} \\[5ex] \textbf{XXXXXXXXXXXXXXXX}\\ \textbf{XXXXXXXXXXXXXXXXXXXXXXX}\\ \textbf{\footnotesize XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}\\ \end{tabular} &amp; \includegraphics[width=3cm]{LogoONAC.png} \\     \end{tabular}    }  \fancyfoot[C]{ - OPERADOR - }  \begin{document}  \lipsum[1-20]  \end{document}
4073
how could i vertically center a &lt;div&gt; within a &lt;div&gt; ?  my code so far:  &lt;div style="height:322px;overflow:auto;"&gt;     &lt;div style="border: Solid 1px #999999;padding:5px;"&gt;     &lt;/div&gt; &lt;/div&gt;   i have tried "top:50%;" and "vertical-align:middle;" without success  EDIT: okay so it's been discussed a lot. and i've maybe started another mini flame war. but for argument sake, how would i do it with a table then? i've used css for everything else so far so it's not like i'm not trying to employ "good practices".  EDIT: the inner div does not have a fixed height
25224
Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references?  I'm aware of clip in CSS, but that seems to only work when used with absolute positioning.
41016
When using fancyhdr, how do you remove the top horizontal rule?  I do not want a header at all, just a footer.  This is what I do now:  \documentclass{article} \usepackage{fancyhdr} \pagestyle{fancy}  \lfoot{text} \cfoot{text 2} \rfoot{text 3}  \begin{document} Foo Bar \end{document}
14681
I want to insert a paragraph or possibly even a box with a background color into a list that uses the whole \textwidth. Something like this:  1st item     a subitem 1    b subitem 2  2nd item    a subitee  \begin{use the full width}    [ Here the text should use the full text width ignoring the list indent] \end{use the full width}    b subitem 3rd item   The list is a normal enumerate.
112335
Lets say I have a text box that I want to fill a whole line. I would give it a style like this:  input.wide {display:block; width: 100%}   This causes problems because the width is based on the content of the text box. Text boxes have margin, borders, &amp; padding by default, which makes a 100% width text box larger than its container.  For example, here on the right:    Is there any way to make a text box fill the width of its container without expanding beyond it?  Here is some example HTML to show what I mean:  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt; &lt;head&gt;     &lt;title&gt;Untitled Page&lt;/title&gt;     &lt;style type="text/css"&gt;         #outer{border: 1px solid #000; width: 320px; margin: 0px;padding:0px}         #inner{margin: 20px; padding: 20px; background: #999;border: 1px solid #000;}         input.wide {display:block; margin: 0px}         input.normal {display:block; float: right}     &lt;/style&gt; &lt;/head&gt; &lt;body&gt;     &lt;div id="outer"&gt;         &lt;div id="inner"&gt;             &lt;input type="text" class="wide" /&gt;             &lt;input type="text" class="normal" /&gt;             &lt;div style="clear:both;"&gt;&lt;/div&gt;         &lt;/div&gt;     &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;   If this is run, you can see by looking at the "normal" text box that the "wide" text box is sticking out beyond the container. The "normal" text box floats to the actual edge of the container. I'm trying to make the "wide" text box fill its container, without expanding beyond edge like the "normal" text box is.
8990
I would like to ask for some simple examples showing the uses of &lt;div&gt; and &lt;span&gt;.   I've seen them both used to mark a section of a page with an id or class, but I'm interested in knowing if there are times when one is preferred over the other.
23137
I was browsing the html of my favorite site...ahem...and I saw this in the markup:  &lt;link href="/Content/all.min.css?d=20090107" rel="stylesheet" type="text/css" /&gt;   what does "?d=20090107" do? I'm assuming it's a date of some kind, but I'm not sure why it's in the path to the file. Any ideas?
102208
What is the difference between # and . when declaring a set of styles for an element and what are the semantics that come into play when deciding which one to use?
102812
&lt;div class="subheader"&gt;         &lt;h1&gt;         &lt;/h1&gt; &lt;/div&gt;   .subheader has style border-bottom: 1px solid #e4e6e8;.  The bottom border should be below the whole title (I guess, the point is to separate the whole title). But the height of this div is hardcoded height: 40px;.  Shouldn't it be like this? (the screenshot with height: 80px;).
39221
So, I can create an input button with an image using &lt;INPUT type=&quot;image&quot; src=&quot;/images/Btn.PNG&quot; value=&quot;&quot;&gt;  But, I can't get the same behavior using CSS. For instance, I've tried &lt;INPUT type=&quot;image&quot; class=&quot;myButton&quot; value=&quot;&quot;&gt;  where &quot;myButton&quot; is defined in the CSS file as .myButton {     background:url(/images/Btn.PNG) no-repeat;     cursor:pointer;     width: 200px;     height: 100px;     border: none; }  If that's all I wanted to do, I could use the original style, but I want to change the button's appearance on hover (using a myButton:hover class). I know the links are good, because I've been able to load them for a background image for other parts of the page (just as a check). I found examples on the web of how to do it using JavaScript, but I'm looking for a CSS solution. I'm using Firefox 3.0.3 if that makes a difference.
123044
I would like to highlight specific digits in a number. Since the number is large I would like to use \num{} from . Of course I can do it manually as in the MWE below, but was hoping that there might be an easy way to use the commented out syntax to accomplish this:  Code: \documentclass{article} \usepackage{xcolor} \usepackage{siunitx}  \newcommand*{\Color}[2][red]{\textcolor{#1}{#2}}%  \begin{document}  \num{99 976}  88\,9\Color{76} %\num{88 9\Color{76}}  77\,\Color{976} %\num{77 \Color{976}}  \end{document}
24835
Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box.   The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either.