#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    1
    Rep Power
    0

    Override style/css from included file?


    Hi,

    I'm wondering if it is possible to override style settings in an external html document. I'm using the <--#include file command to include a html file. I don't want to modify the html file, because people (here at work) are making documents in word9 and save it to html. The major problem is that the <hr> line is too long and so is the text, so it don't fit on our website, at this point these documents are opened in a new window, but it would be nicer to intergrate them into our site.

    thanks

    -Dan
  2. #2
  3. Power User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Location
    Canada
    Posts
    180
    Rep Power
    11
    if the documents have inline style definitions/declarations then no, you can't override an inline or embedded style with an eternal style. At least not to my knowledge. If this is possible I would grateful to find out how

    There are free programs out there that strip MSword html tags from webpages.
    You would need to edit the file, then choose to remove all MsWord code. This way you could define your own styles for headers and paragraphs in an external css sheet and then you could include it into the page.
    I don't recall where you can get the free software, but it's on the net somewhere...

    However it may be worse, as you may strip needed code. It's a thought, so don't go rushing to do this.
    I'm sure someone else will have a good sugestion for you
  4. #3
  5. a rootin', tootin', shootin'
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Feb 2004
    Location
    location.href="hame"
    Posts
    3,475
    Rep Power
    100
    Originally Posted by webguy
    if the documents have inline style definitions/declarations then no, you can't override an inline or embedded style with an eternal style. At least not to my knowledge. If this is possible I would grateful to find out how
    not necessarily so. if you use the "!important" declaration in your style definitions (and Word hasn't), then it should take precedence. this declaration prioritises the over-riding style.
  6. #4
  7. Power User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Location
    Canada
    Posts
    180
    Rep Power
    11
    It's great you brought this up, but IE support for this, last I heard, is next to nill.

    While other major browsers support this, Ie is the majority browser. So we can't rely on !important.
    However, I don't use !important at all so it could be I am missing something important here..no pun intended .

IMN logo majestic logo threadwatch logo seochat tools logo