CSS Consolidator
$20-25 USD
货到付款
I have a bunch of pages with style in the divs like so:
<div id="mydiv1" style="width: 300px; border-style: solid; " ></div>
Of course things would be better if that was in a separate CSS file:
#mydiv1{
width: 300px;
border-style: solid;
}
and then the original file edited to remove the style from the div tag.
So I am looking for a php file that can do this.
Here are some considerations:
- all css files should be in a "css" folder. The "css" folder is located in the same place as the html file. Name the css file in reference to the html file so [login to view URL] has a [login to view URL] in the "css" folder
- apostrophe and quotation marks are used interchangeably in these files so please account for that
- some of the files are php so please also support tags that are escaped like so:
echo "<div id=\"mydiv1\" style=\"width: 300px; border-style: solid; \" ></div>";
and avoid damaging the rest of the code
-search for style tags regardless of what they are located in ... span, a, and so on
- if the tag has no id give it a generic sequential one like id="style003"
- have the php file that does this work have a string at the top where I can enter file names separated by commas for it to go to work on.
Thats it! Just a clean, working example, please no third party libraries
项目ID: #2758070