Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9066469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:44:25+00:00 2026-06-16T16:44:25+00:00

I have no idea what I’m doing wrong. I am using Twitter Bootstrap with

  • 0

I have no idea what I’m doing wrong.

I am using Twitter Bootstrap with a basic page for a front end and serving everything with Python / WebApp2 (Not Google App Engine) in the back end.

If I load the page from the server in Internet Explorer 8, the styles appear.

If I load the page from C:/ in Chrome, the styles appear.

If I load the page from the server in Chrome, the styles do not appear.

I’ve checked all my mime types, compared the C:/ and server pages and everything looks the same.

I cannot for the life of me figure out why Chrome isn’t rendering the style sheets when served by Python / WebApp2.

I can’t figure out how to put code without it actually processing in this text box, so the page I’m using is basically the same as the example shown here:
http://twitter.github.com/bootstrap/getting-started.html

Any ideas?

Python Script for css
https://i.stack.imgur.com/Tu4NX.png

Non Styled – Served by Python / Webapp2 viewed in Chrome
https://i.stack.imgur.com/vfKIa.png

Styled – Pulled from C viewed in Chrome

https://i.stack.imgur.com/35C4S.png

Non Styled – Chrome Resources Tab
https://i.stack.imgur.com/HvQXt.png

Styled – Chrome Resources Tab
https://i.stack.imgur.com/Rel3r.png

I am able to pull up CSS file in Chrome Resources tab and see contents of CSS file. No warnings that it is interpreted as text/xml in console.
https://i.stack.imgur.com/5gTUO.png

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:44:26+00:00Added an answer on June 16, 2026 at 4:44 pm

    GAAAH I just figured it out!

    In my python code about, you can see I am using ‘self.response.headers.add_header’. I guess whenever you use the ‘self.response.out.write’ function, it has a ‘text/html’ content type by default. if you ‘add headers’ to that, then it adds a ‘text/css’ header before the final ‘text/html’ header. Chrome then reads the last header and uses this as the content type for the style shee. I guess IE and Opera use the first?
    Anyways: to fix, use:

    self.response.headers['Content-Type'] = "text/css"
    

    and as a whole

    def css(self, css_dir, filename, extension):
        self.response.headers['Content-Type'] = "text/css"
        self.response.out.write(open(css_dir + filename + extension,"rb").read())
    

    Yay!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone have idea how to pass value from iPhone application to the REST-Webservice using
I have a basic idea of HTML. I want to create the download link
I am creating Excel using DocumentFormat.OpenXml in ASP.Net. Can anybody have idea how can
I want to make phone based textbox in my html-page. someone have idea how
Anyone have idea how can find available IP addresses in a network using any
Any one have idea how can get TAG of facebook photos using FQL?
Do any one have idea for finding true direction using iPhone? I want to
Any one have idea about how to post on our Google+ Stream using Google+
Anyone have idea about how to bind Boolean in sqlite with objective - c.
I have idea to write errors from my application to the Windows Event Viewer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.