Glen_S
03-11-2010, 06:05 PM
Not sure if this is the right board or if it should be in the PHP section, but here goes:
Here is my situation, in my CSS style sheet I have several div box definitions, like so:
#box3 { float:left;
margin-right: 0px;
margin-top: 0px;
height: 75px;
width: 800px;
border: none;
padding: 0px;
background: clear;
}
I usually will put this at the bottom of a page, then include a list of links by pointing at a php file by putting this in my page body:
<div id="box3" class="menu">
<?php include( 'php/topmenu.php' ); ?>
</div>
Now, this works great, because when I change a link in the php file, it is propogated across all pages that use said file.
However, I am building a new site, and using the same type of stylesheet, and what I would like to do is somehow embed the links right in the CSS style sheet to take one step away.
I tried this in my stylesheet, but it didn't work:
#box3 { float:left;
margin-right: 0px;
margin-top: 0px;
height: 75px;
width: 800px;
border: none;
padding: 0px;
background: clear;
<?php include( 'php/topmenu.php' ); ?>
}
The reason I want to do this is I've already built quite a few pages with the "box3" div at the bottom of them, and now decided to put a set of links in them, and I was wondering if there was some way to just embed the php links file in the CSS stylesheet itself, so save me from opening each page one at a time and inserting the <?php include( 'php/topmenu.php' ); ?> in each one. (I suppose I could do a mass edit in textpad, but it would probably take me longer to figure out how to so that than just doing each page one at a time)
If this is possible I'd really appreciate someone showing me how..
thanks!
Here is my situation, in my CSS style sheet I have several div box definitions, like so:
#box3 { float:left;
margin-right: 0px;
margin-top: 0px;
height: 75px;
width: 800px;
border: none;
padding: 0px;
background: clear;
}
I usually will put this at the bottom of a page, then include a list of links by pointing at a php file by putting this in my page body:
<div id="box3" class="menu">
<?php include( 'php/topmenu.php' ); ?>
</div>
Now, this works great, because when I change a link in the php file, it is propogated across all pages that use said file.
However, I am building a new site, and using the same type of stylesheet, and what I would like to do is somehow embed the links right in the CSS style sheet to take one step away.
I tried this in my stylesheet, but it didn't work:
#box3 { float:left;
margin-right: 0px;
margin-top: 0px;
height: 75px;
width: 800px;
border: none;
padding: 0px;
background: clear;
<?php include( 'php/topmenu.php' ); ?>
}
The reason I want to do this is I've already built quite a few pages with the "box3" div at the bottom of them, and now decided to put a set of links in them, and I was wondering if there was some way to just embed the php links file in the CSS stylesheet itself, so save me from opening each page one at a time and inserting the <?php include( 'php/topmenu.php' ); ?> in each one. (I suppose I could do a mass edit in textpad, but it would probably take me longer to figure out how to so that than just doing each page one at a time)
If this is possible I'd really appreciate someone showing me how..
thanks!