If you’re able to rename your CSS file “layout.php”, there’s no need for all of these workarounds:
Your layout.php file would look like:
<?php header("Content-type: text/css; charset: UTF-8"); ?> body{ margin:0px; font:9px/11px "Tahoma", Arial, Helvetica, sans-serif; color:#010000; background:#f3f6e1 url(<?php echo base_url().'public/';?>images/body_bg_1.gif) repeat-x 0 0}
Your HTML files would look like:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="css/layout.php" media="screen"> </head>
This question is very similar: Include: css with php file extension?
Related Posts:
- PHP Include Nav-bar For Every Page Techniques?
- How to create a text box in PHP to output data
- Half circle with CSS (border, outline only)
- Unblur content inside blurring background div
- Failed to load resource: the server responded with a status of 404 (Not Found) css
- CSS background-image-opacity?
- Resize image proportionally with CSS?
- Setting table column width
- Embed image in a
- What is difference between png8 and png24
- How to center an iframe horizontally?
- Can I have an onclick effect in CSS?
- How to style a checkbox using CSS
- Parse error: Syntax error, unexpected end of file in my PHP code
- Parse error: Syntax error, unexpected end of file in my PHP code
- CSS Background Image Not Displaying
- How to place a text next to the picture?
- Fix footer to bottom of page
- How to position text over an image in css
- shifting a piece of text down using CSS
- Display Two s Side-by-Side
- Add border-bottom to table row
- Center form submit buttons HTML / CSS
- AngularJS ngClass conditional
- CSS: Moving the text down a few pixels but keeping the background still?
- How to darken a background using CSS?
- What are .tpl files? PHP, web design
- How to use css first-child with :not()
- How to draw diagonal lines with css
- How to solve PHP error ‘Notice: Array to string conversion in…’
- How to display and hide a div with CSS?
- How to keep footer at bottom of screen [duplicate]
- Draw a line in a div
- Change Color of Fonts in DIV (CSS)
- Why is “cursor:pointer” effect in CSS not working
- a href link for entire div in HTML/CSS
- How to read if a checkbox is checked in PHP?
- Check if an element contains a class in JavaScript?
- Complete list of reasons why a css file might not be working
- html div background image not showing up
- Bring element to front using CSS
- Brackets – Live Preview not working
- How to apply style classes to td elements?
- CSS set li indent
- how to overlap two div in css?
- Why does this CSS margin-top style not work?
- Freeze the top row for an html table only (Fixed Table Header Scrolling)
- HTML list-style-type dash
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery
- How can I make my footer center to the bottom of the page?
- Remove scrollbar from iframe
- Why would max-width not work on this?
- Dynamic height of div with css
- Making text background transparent but not text itself
- Removing ul indentation with CSS
- Square brackets in CSS
- How do I disable form fields using CSS?
- Why write script type=”text/javascript” when the mime type is set by the server?
- body background color not showing?
- How to make a div 100% height of the browser window
- css display table cell requires percentage width
- Why doesn’t min-height not work on my page?
- How to write a:hover in inline CSS?
- CSS Resize/Zoom-In effect on Image while keeping Dimensions
- How to draw a trapezium/trapezoid with css3?
- How can I change the Bootstrap default font family using font from Google?
- Add stroke around text – on the outside – with css?
- Full Page < iframe >
- Change cursor to hand when mouse goes over a row in table
- CSS table td width – fixed, not flexible
- Can I apply a CSS style to an element name?
- CSS max-height not working
- How can I make a div not larger than its contents?
- Horizontal list items
- How to make Bootstrap Panel body with fixed height
- word-wrap break-word does not work in this example
- Change navbar text color Bootstrap
- position fixed is not working
- Create a slanted edge to a div [duplicate]
- Override USER AGENT STYLE SHEET – Chrome
- Place a button right aligned
- aking a flex item float right
- Show post in slider
- How can I hide Home in my menu in a specific page?
- how to remove metadata from the posts of my blog?
- How put links in wordpress dynamic sidebar?
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- Using custom HTML tags to WordPress [closed]
- Where can I find the inline-css of my theme header?
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- featured post as div background
- Trying to customize wordpress drop down categories
- WP_Query not returning results
- How do I link the side images?
- How to create a container in php then customise it in CSS
- Option value not getting updated until page refresh in WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Add border-bottom to table row