Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

search.asp with a style.css possible?

Been poking around here awhile... closest i found was

2:46 pm on Jul 26, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

Moderator This Forum

report msg
joined:Mar 15, 2002
#:1193773 8:05 am on Nov 6, 2003 (utc -8)

Well, you can't use SSI inside a CSS file. So, link to the ASP/PHP file, and make the script output your CSS ;)
Just make sure it outputs it with the correct mime type in the headers: text/css

Or, you can change your server settings, and make all CSS files parsed by the ASP/PHP engine.

taken from [webmasterworld.com...]
I have an index page, index.htm, that is running on IIS 5.1. I found an asp search code that when the search box is used on the site, it pulls the results from my catalog/directory, into a file called search.asp. The problem is, the whole site uses a css sheet, and I'd like to have the search results be displayed consistently with the site. But everytime I add the reference to the style.css, my navigational <divs> expand all the way to the right, probably about 3000px, with the search results being displayed at about 1500px to the right.

Is there a way I can call that css page from my asp page and have it properly parsed or displayed?

How would i change my server settings to make css files parsed by the ASP engine?

Thanks, jake

10:16 pm on Jul 26, 2007 (gmt 0)

5+ Year Member

Hi Jake,

I'm not sure I fully understand what you're trying to do, but can you not have a separate style sheet for the search.asp page?

Link in both .css pages, with the "master" site stylesheet first, followed by your search one.
You can then use the master CSS to set your basic styles, like fonts, etc on the search page but use the second stylesheet to overwrite any layout issues you may be having.

6:18 pm on Aug 1, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

Well, I got my display issue kind of worked out, had to do an ugly hack with a table and dropping the nav div and content div into 2 rows, and then add a spacer below the nav div for everthing to display properly.

If anyone ever looks at the code, their gonna be like #*$!? heeh.


7:21 pm on Aug 1, 2007 (gmt 0)

5+ Year Member

Hehe, not sure I helped but no problem - any time :P

Featured Threads

Hot Threads This Week

Hot Threads This Month