Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Convert XML to CSS

Sep 28, 2008 4:58AM PDT

I have an excellent Blogger template in the XML file format. I want to make it into a CSS file so I can base HTML files on it. Any idea how to do that?

Discussion is locked

- Collapse -
(NT) I would just manually type the css as needed.
Sep 28, 2008 5:09AM PDT
- Collapse -
I've tried cutting and pasting the contents
Sep 28, 2008 5:19AM PDT

I have copied the XML file's contents to the CSS file, but now I don't know how to make HTML files that use that stylesheet.

- Collapse -
Re: using a css-file in html
Sep 28, 2008 5:27AM PDT

Put
<link rel="stylesheet" href="mystylesheet.css">
somewhere in the heading.

Below I copied a typical (albeit short) stylesheet file. It's not xml, as you notice, but css.

h2 {
font-family: Verdana, Arial, Tahoma, sans-serif;
font-weigth: normal;
font-size: 150%;
margin-top: 0em}

Kees

- Collapse -
Right, but...
Sep 28, 2008 5:30AM PDT

Simply copying that line into the HTML file (as I've already tried) won't give the HTML file all the properties, such as where the headers go, columns, etc.

- Collapse -
Re: css
Sep 28, 2008 5:38AM PDT

Putting a line like <link rel="stylesheet" href="mystylesheet.css"> in the header of your html-file and putting the needed contents (like my simple example) into that file and putting that file in the same directory on the webserver as that html-file would result in all header2's on the screen in large Verdana.

Just try. Reading http://htmlhelp.com/reference/css/style-html.html might be useful.


Kees