WordPress.org

Ready to get started?Download WordPress

Forums

Plain site to theme for newbie - how to strip only used CSS (6 posts)

  1. digitaltoast
    Member
    Posted 4 years ago #

    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.

  2. aianta03
    Member
    Posted 4 years ago #

    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

  3. digitaltoast
    Member
    Posted 4 years ago #

    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.
    http://www.ethicalchange.com/

    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...

  4. krembo99
    Member
    Posted 4 years ago #

    ... and no idea why but **TRIPLICATED***

  5. krembo99
    Member
    Posted 4 years ago #

    your css is quite normal in size , however, it is true you have some redundancy css selectors...
    ..
    if you want to check it yourself ...
    http://floele.flyspray.org/csstidy//css_optimiser.php

    http://www.cleancss.com

    http://services.immike.net/css-checker/ (good one)

    a lot more here

    http://vandelaydesign.com/blog/css/clean-css-code/

  6. Mark / t31os
    Moderator
    Posted 4 years ago #

    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

    and

    tag+tag

    Some browsers will not interpret either of these selectors, quite simply they're not fully supported.
    http://www.quirksmode.org/css/contents.html

    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).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags