Jump to content

additional css files wont work...


Hall of Famer

Recommended Posts

Well in my project there is a main css file defined for the template, with additional css files stored in a folder called /css. Whenever an additional css file needs to be included, the following php script is called:

 

include("css/additionalcss.css");

 

Inside the additional css file, the script looks somewhat like this:

 

?>

<style type="text/css">

// css content in here

</style>

<?

 

It has been working out nicely until I noticed that the font style and size is messed up. Here is a comparison of the two pmessage.php files with and without the additional css called pagination.css. As you can see, the font is seriously screwed with additional css.

 

34pe3vs.jpg

 

zl4s40.jpg

 

Oddly enough, this font style/size problem will not be present if I copy/paste css content directly to the main template css file. Why is the font messed up with additional css files? I have absolutely no idea... Please help.

 

If you need more info, the css file pagination.css is provided below:

 

?>

<style type="text/css">

div.pagination {
padding: 3px;
margin: 3px; font-family:Verdana; font-size:8pt; text-decoration:none
}

div.pagination a {
margin: 2px;
border: 1px solid #000000;

text-decoration: none; /* no underline */
color: #000000;font-family:Verdana; font-size:8pt; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}
div.pagination a:hover, div.pagination a:active {
margin: 2px;
	border: 1px solid #800000;

	background-color: #800000;
	color: #FFFFFF;font-family:Verdana; font-size:8pt; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px; text-decoration:none
}
div.pagination span.current {
margin: 2px;
	border: 1px solid #000000;

	font-weight: bold;
	background-color: #000000;
	color: #FFFFFF;font-family:Verdana; font-size:8pt; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}
div.pagination span.disabled {
	margin: 2px;
	border: 1px solid #999999;

	color: #999999;font-family:Verdana; font-size:8pt; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}

a:hover.list { font-family: Verdana; font-size: 8pt; font-variant: small-caps; 
               text-decoration: underline; text-transform: capitalize; 
               color: #006699; line-height: 200%; font-weight: bold }
a.list       { text-transform: capitalize; font-variant: small-caps; font-family: Verdana; 
               font-size: 8pt; color: #FF0000; text-decoration: underline; 
               line-height: 200%; font-weight: bold }	

</style>

<?

Link to comment
Share on other sites

Well yeah. Like I pointed out before, I use the php include function to import additional css file(the main css is defined through an html page though). In order for the script to work, I have to write in this format:

 

?>
<style type="text/css">
// css content in here
</style>
<?

 

So yeah, it is because I cannot write css content directly inside php tag.

Link to comment
Share on other sites

I'm not sure I know what your doing.

 

If this ..

 

<?php

include ("css/additionalcss.css");

?>

 

 

Take out the php tags in your css and try it

 

Opening and closing php tags should be <?php & ?>

 

I don't know where you're at in your script as far as opening and closing php tags go.

 

Play with it and see what happens

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.