How much CSS can be included in a "style" in HTML tag?
-
I’ll apologize now if this question has been asked before but I couldn’t find it.
Some options use “style=” within the HTML tag to set up basic layout but I would like to know if it a restricted subset of CSS commands that can be used this way.
I want to make some layout changes (position, float etc) but only applicable to a single page and therefore they don’t need to be in site.css. Can I do this?
Is there a limit on the amount of CSS that can be in site.css other then generally slowing down all the pages if it gets really big?
Thanks
AndyThe blog I need help with is: (visible only to logged in users)
-
You can use style attribute in div tag. Here is an example:
<div style="here_comes_css">Content </div>
For example if you want to change color of font inside the div tag, here is the code
<div style="color:red">Content </div>Hope it helps
-
Thank you for your reply and that is how I want to use it but my question is can any CSS commands be included this way such as layout and formatting statements (e.g. position, float) or is it just limited to commands that style the text (e.g. color, border etc.).
I did try some of the layout commands and it appeared that they were removed by the WordPress system but I’d have to test that again to be sure.
It would be nice to see a list of the allowed commands if there is a restriction of what can and cannot be used.
Thanks
Andy
- The topic ‘How much CSS can be included in a "style" in HTML tag?’ is closed to new replies.