Support » Themes and Templates » Plain site to theme for newbie – how to strip only used CSS

  • I’d like to find ONLY the CSS used in a page.

    A site was made for a friend, but the designers editing “back end” was so bad and the hosting so poor, I said I’d help them move it to WordPress.

    But the CSS file is huge – they’ve thrown everything plus the kitchen sink into one file! To help me out, I’d like to keep only the stuff used in the standard front end pages, but it’s not even laid out clearly.

    So any help would be appreciated! Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t quite understand what you are asking…
    Moving an HTML’s site CSS to wordpress won’t work, you would have to recreate the site with a different wordpress theme.

    Save theme before you do any of this
    If your friends site is already a wordpress site, then you have to look on all the php file (excluding the ones that only work back end ex. functions.php) and mark down all the CSS ID’s and classes. Erase any other classes and ID in the CSS file that were not found in the php files.
    Make sure to keep general CSS rules such as the ones for links

    Also, CSS files are generally big so unless it is a file with 1000 lines + I don’t think you need to get rid of stuff

    Sorry, I didn’t get notified of the reply! Thanks for responding.

    When the hosting/backend all started to go wrong, we spidered the site to “plain” html.

    A top bar, a sidebar on the left, and a main bit on the right. And not that many styles. I’m not asking anyone to do the site for me, but a pointer to a “simple themes for dummies” wordpress guide might be helpful 🙂

    I’ve found a few, but they either seem to be too simple or too in-depth! I think the thing I’ll struggle most on in the rollover arrow for the top menu selectors…

    … and no idea why but **TRIPLICATED***

    your css is quite normal in size , however, it is true you have some redundancy css selectors…
    if you want to check it yourself … (good one)

    a lot more here

    Everything you need is under the “Docs” link in the top right corner…

    For anything else you’ll have to ask specifically what it is you wish to know..

    General questions like “How do i code a theme” cover way to many things for anyone to sit here and write a blow by blow account of the procedure.

    If the guides you’ve seen are too basic or too in-depth, then start with the simple ones and just pick out what you need to know, at some point the more advanced topics will make sense to…

    For what it’s worth the CSS on that site is far from being unfriendly, i’ve seen far worse CSS, and it does look quite minimal.. though i’m sure to some people it can look like alot. There are a few things i spotted in your current CSS that certain browsers will not interpret.

    tag > anothertag



    Some browsers will not interpret either of these selectors, quite simply they’re not fully supported.

    The above are referred to as sibling(second) and child(first) selectors. Although most major browsers will know what to do with these, not all will. If you have no idea what i’m talking about then disregard what i’ve said as you’ll likely not be taught to use these in a standard CSS guide/tutorial anyway (well not a sensible one).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plain site to theme for newbie – how to strip only used CSS’ is closed to new replies.