![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
CSS Question
I'm working on some articles for Google's new Knol project. Contributors
area allowed to paste in HTML, which can include inline CSS - but it won't accept <style></style> tags, nixing my attempt to add this: <style> p { text-indent: 15px; } </style> Is there another way to automatically indent every paragraph? For example, if I wrap a submission inside two div tags... <div> (Article> </div> ....could I add some sort of CSS style to <div> that would style each paragraph? I could just modify each paragraph tag, chaing it to <p style="text-indent: 15px;">, but that seems a little tedious. Thanks. |
|
|||
|
Re: CSS Question
David Blomstrom wrote:
> I'm working on some articles for Google's new Knol project. Contributors > area allowed to paste in HTML, which can include inline CSS - but it > won't accept <style></style> tags, nixing my attempt to add this: I'm not sure - but this kind of thing may help... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> body { background: #E0DFE3; font-family: Arial, Helvetica, sans-serif; color: #000000; font-size: 100%; margin: 0px; padding: 0px; } #wrapper { background: #BCBAC2; width: 760px; border: 1px solid #000000; margin: 0px auto; padding: 8px; } #wrapper p { margin: 6px 0 12px 0; } ..yourdiv { background: #666666; width: 500px; margin-right: auto; margin-left: auto; padding: 15px; } ..yourdiv p { font-size: 80%; color: #FFFFFF; margin: 6px 0 12px 0; } </style> </head> <body> <div id="wrapper"> <p>This is stuff in the wrapper div - you'd probably want to exteralise the CSS as it will be only one file to change and upload! </p> <p>And a new paragraph here </p> <div class="yourdiv"> <p>So this is article stuff folks enter into yourdiv</p> </div> <p>This is more stuff in the wrapper div</p> <div class="yourdiv"> <p>So this is more article stuff folks enter into yourdiv - So this is more article stuff folks enter into yourdiv.</p> <p>This is a new paragraph within yourdiv! </p> </div> </div> </body> </html> -- chin chin Sinclair |
|
|||
|
Re: CSS Question
djinn wrote:
> <style type="text/css"> > </style> Thanks, but Knol won't accept this feature. Even if it did, I don't have access to the head section. As an experiment, I inserted a <style type="text/css"> tag, and the results were utterly bizarre. It separated and multiplied my styles. When I deleted the entire thing, they multiplied even more, until I had a huge string of repeating styles. Weird. |
|
|||
|
Re: CSS Question
David Blomstrom wrote:
> djinn wrote: > >> <style type="text/css"> >> </style> > > Thanks, but Knol won't accept this feature. Even if it did, I don't have > access to the head section. > > As an experiment, I inserted a <style type="text/css"> tag, and the > results were utterly bizarre. It separated and multiplied my styles. > When I deleted the entire thing, they multiplied even more, until I had > a huge string of repeating styles. Weird. Oh! - yes! - sorry! - that'll be the death knell for knol then? ;-) -- chin chin Sinclair |
|
|||
|
Re: CSS Question
..oO(David Blomstrom)
>I'm working on some articles for Google's new Knol project. Contributors >area allowed to paste in HTML, which can include inline CSS - but it >won't accept <style></style> tags, nixing my attempt to add this: Does it reject those elements? ><style> >p { text-indent: 15px; } ></style> While invalid code, I used a 'style' element with an @import rule in the document body(!) on eBay a while ago to embed my own stylesheet into their page layout. Worked well enough, because browsers are trained to accept almost every crap. You could even try a 'link' element or some scripting. The entire Google markup is invalid anyway, so IMHO it doesn't really matter if you try some dirty tricks. >Is there another way to automatically indent every paragraph? For >example, if I wrap a submission inside two div tags... > ><div> >(Article> ></div> > >...could I add some sort of CSS style to <div> that would style each >paragraph? Nope, not with inline-CSS. If no other method works, you would have to apply those rules to every single paragraph. But there's one important point left: You should ask yourself if it's really necessary. Especially in such big projects like Knol or Wikipedia there are reasons why authors are not given all the available methods of pure HTML. Would you like to see some Wikipedia articles with a green background, other ones with yellow text on huge background images? It's the content that matters, and authors should follow the rules as defined by the authoring system. Micha |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|