HTML///CSS Mixed

Discussion in 'HTML & Website Design' started by chiller4life, Jun 9, 2012.

  1. #1
    hi i have a page where HTML and Css is mixed is there any program that can seperate html and css

    please this will really help

    thank you
     
    chiller4life, Jun 9, 2012 IP
  2. hirenrathod39

    hirenrathod39 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I can help you in some if you give me some details.


    hirenrathod39@gmail.com
     
    hirenrathod39, Jun 12, 2012 IP
  3. imdenisejones

    imdenisejones Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #3
    The best way to take the CSS out of your HTML code is to sift through your HTML code and copy and paste the CSS code into a stylesheet. So if you have:

    <p style="background-color: #ffff10">This paragraph has a yellow background.</p>

    You can make look like this in HTML:

    <p class"yellowBg">This paragraph has a yellow background</p>

    And make your stylesheet look like this:

    .yellowBg {
    background-color: #ffff10;
    }

    If you have a lot of CSS code in your document, it will take some time to go through it.
     
    imdenisejones, Jun 15, 2012 IP
  4. cons1t

    cons1t Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #4
    To get you started might do some of the labouring for you. voodoobytes.info/humbles-tools/
     
    cons1t, Jun 15, 2012 IP
  5. archampion

    archampion Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    I can help you but I do charge an amount. :)
     
    archampion, Jun 18, 2012 IP
  6. henry001

    henry001 Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think there is no program which can separate HTML and CSS but you can convert PHP to HTML. If cut off your CSS and want to create your page only by HTML. Then you need to do it manually.

    Thanks
     
    henry001, Jun 20, 2012 IP
  7. cons1t

    cons1t Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #7
    www.voodoobytes.info/humbles-tools/
    Code (markup):
    seems the address don't work without www, it extracts the css, creates classes, then outputs 2 new files with the new classes linked up. Can I get a big solved thingie for the thread?
     
    cons1t, Jun 20, 2012 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #8
    I would advise against using any automated tool for this - you'll end up with classes that are either vague/meaningless, or you'll end up with classes that are presentational, defeating the entire point of having CSS in the first place.

    If the page was built with the style inlined in the markup using the style tag and/or attribute, it is entirely likely the page was built without proper semantic markup in the first place and was instead built with outdated/outmoded techniques. An automated tool just isn't going to fix that as if that is indeed the case, the entire thing needs to be thrown out and started over from scratch.

    Which is probably less work than trying to go through and crap all over the page with rubbish classes like "yellowBG".

    Though without a link to the page in question anything we tell you here is a wild guess.
     
    deathshadow, Jun 20, 2012 IP
  9. cons1t

    cons1t Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #9
    I agree, but the thread asks for a program to do it and the program does. As such is solved, even if its not a great idea. So I can still get my thingie...
     
    cons1t, Jun 20, 2012 IP