Losing Styles when calling page by /?id=1

QuestionsLosing Styles when calling page by /?id=1
Tomme asked 7 years ago

Hi,

I want to call pages that has grids by passing parameters in the url with /?…
I have been studying the examples and get it to work when the page as no stylesheet linked, the grid loads with the data i expect.

But, as soon as i link a stylesheet, (to control my divs and make my site look nice), things go crazy.
When calling the page without passing anything in the url everything looks ok, but when i add for example /?id=1 to the url no styling is active.

Any suggestions are much welcome.

Thanks
Tomme

2 Answers
Abu Ghufran answered 7 years ago

Hi,

Please check using firebug if all css files are loaded with new url, with correct path.
Most likely either files are not loaded or conflicting with existing css files. Try removing each of them to verify.

Regards

Tomme answered 7 years ago

I found the reason…

I was linking to my stylesheets by the filename only, as in:
<link rel="stylesheet" href="mainstyles.css" type="text/css"></link>

When adding /?id=1 to the url the stylesheets could not be found, but the error was strange, it was complaining that the MIME type on the css files was text/html instead of text/css.

Anyway, when linking to the stylesheets using root-relative path's it worked:
<link rel="stylesheet" href="/vehicles/mainstyles.css" type="text/css"></link>

Thanks for the tip about firebug, it makes life a lot easier! 🙂

Since i now can see that PHP Grid works with div's about as i expect and i have the need for multiple grids on the same page (different div's) i will buy the premium version.

Thanks
Thomas

Your Answer

15 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?