Re: body id='...'

2015-01-18 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-17 18:30, Andrei Alexandrescu wrote: Thanks! See http://goo.gl/aHeZmQ where I've added the page title as the ID. Sadly that doesn't work for titles that contain whitespace (quite a few), see

Re: body id='...'

2015-01-18 Thread Jacob Carlborg via Digitalmars-d
that. body id=foo table ... /table /body body#foo table { background-color: red; } Or alternatively: body table id=foo ... /table /body table#foo { background-color: red; } If you have several element that needs this kind of styling you only need to add one id, to the body tag

body id='...'

2015-01-17 Thread Andrei Alexandrescu via Digitalmars-d
Hello, I was looking at http://css-tricks.com/examples/CleanCode/Beautiful-HTML.png, which includes an interesting comment: ID applied to body to allow for unique page styling without any additional markup. That sounds pretty interesting, so I plan to add id=$(TITLE) to the body tag of

Re: body id='...'

2015-01-17 Thread Jacob Carlborg via Digitalmars-d
page, replace slashes with dash or underscore. Something like this: For the page http://dlang.org/spec.html html body id=spec ... /body /html Then in the CSS you can add special styling for a given page, like this: // custom styling for the spec page body#spec { background-color: black

Re: body id='...'

2015-01-17 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 17 January 2015 at 08:22:19 UTC, Andrei Alexandrescu wrote: Hello, I was looking at http://css-tricks.com/examples/CleanCode/Beautiful-HTML.png, which includes an interesting comment: ID applied to body to allow for unique page styling without any additional markup. That

Re: body id='...'

2015-01-17 Thread Andrei Alexandrescu via Digitalmars-d
On 1/17/15 2:16 AM, Sebastiaan Koppe wrote: On Saturday, 17 January 2015 at 08:22:19 UTC, Andrei Alexandrescu wrote: Hello, I was looking at http://css-tricks.com/examples/CleanCode/Beautiful-HTML.png, which includes an interesting comment: ID applied to body to allow for unique page styling

Re: body id='...'

2015-01-17 Thread Andrei Alexandrescu via Digitalmars-d
is probably to use the URL of the current page, replace slashes with dash or underscore. Something like this: For the page http://dlang.org/spec.html html body id=spec ... /body /html Then in the CSS you can add special styling for a given page, like this: // custom styling for the spec