1

A client has an older static HTML site which I would like to port over to WordPress, but I have been informed that this can be very time consuming re 50 pages.

I have FTP access for various reasons because the owner cannot get the login details for me, and have found that there is no style.css files/folders even though I see CSS styling in the code on each page. How would I go about changing the CSS style for just the home page so I can give the page a more up to date look? Directly via the CSS styling code on the page?

1
  • Presumably the link rel="stylesheet" element references something? But this does not relate to a file system path? The URL could be redirected or internally rewritten somewhere else, even above the webroot. It's also possible that the stylesheet is "generated" by a server-side script - but for an old static HTML site I find this highly unlikely.
    – MrWhite
    Aug 12 '14 at 9:57
2

You could use inline css.

An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, inside the tag, like this:

<head>
<style>
hr {color: sienna;}
p {margin-left: 20px;}
body {background-image: url("images/background.gif");} 
</style>
</head>

An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly!

To use inline styles, add the style attribute to the relevant tag. The style attribute can contain any CSS property.

You can also use !important to override any css styles;

#example p {
    color: blue;
}
...
#example p {
    color: red;
}

The later rule overrides the earlier rule, and paragraphs within #example will be red.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.