Normally I just use images with a rollover counterpart, however this time I just want to use text.
I want to set the font-family and size of the menu, which is located in a file called menu.php.
I've gotten it to recognize when the links are being rolled-over so that it changes color (pretty much just echo'ing the a: active tag), but I can't figure out how to define the above mentioned attributes.
Also, do multiple line breaks (<br />'s) not work within an included page?
Here's my CSS code:
index.php:
Expand|Select|Wrap|Line Numbers
- <style>
- .main
- {
- background: #FFFFFF;
- width: 969px;
- padding-top: 5px;
- }
- .header
- {
- width:961px;
- background:#FFFFFF;
- border: 1px solid #eaeaea;
- margin-bottom:5px;
- }
- .navigation
- {
- background: url('images/menuback.jpg');
- width: 186px;
- border: 1px solid #eaeaea;
- float: left;
- padding-left: 10px;
- margin-bottom:20px;
- height: 296px;
- }
- .leftbar
- {
- background:#FFFFFF;
- width:196px;
- float: left;
- }
- .rightbar
- {
- width:196px;
- background: #FFFFFF;
- float: right;
- }
- .latest
- {
- background: #FFFFFF;
- width: 196px;
- border: 1px solid #eaeaea;
- float: left;
- padding-bottom: 5px;
- margin-top: 20px;
- }
- .bottom
- {
- width:961px;
- background: #FFFFFF;
- height: 25px;
- clear: both;
- }
- .contentholder
- {
- width:961px;
- background:#FFFFFF;
- display: block;
- }
- .content
- {
- background: #FFFFFF;
- width: 535px;
- border: 1px solid #eaeaea;
- margin-left: 4px;
- margin-right: 3px;
- text-align:left;
- padding-left:5px;
- padding-right:5px;
- padding-top:3px;
- }
- .advertise
- {
- background: url('images/menuback.jpg');
- width: 196px;
- border: 1px solid #eaeaea;
- float: left;
- margin-top: 20px;
- }
- .spacerdiv
- {
- background: #FFFFFF;
- width: 196px;
- height: 50px;
- }
- .promos
- {
- background: #FFFFFF;
- width: 196px;
- border: 1px solid #eaeaea;
- float: left;
- margin-bottom: 20px;
- height: 296px;
- }
- .style2
- {
- font-family:Arial, Helvetica, sans-serif;
- font-size: 12px;
- color:#000000;
- font-weight: bold;
- text-align:center;
- }
- .style5 {
- color: #000000;
- font-family: Arial, Helvetica, sans-serif;
- }
- .style6 {font-family: Arial, Helvetica, sans-serif}
- .style11 {font-size: 14px}
- .style13 {font-family: Arial, Helvetica, sans-serif; font-size: xx-small; }
- .style15 {font-size: x-small}
- .style16 {font-family: Arial, Helvetica, sans-serif; font-size: x-small; }
- .style17 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
- a {
- font-family: Arial, Helvetica, sans-serif;
- color: #CC0000;
- font-size: 12px;
- font-weight: bold;
- }
- a:visited {
- color: #CC0000;
- text-decoration: none;
- }
- a:hover {
- color: #000000;
- text-decoration: none;
- }
- a:active {
- color: #CC0000;
- text-decoration: none;
- }
- a:link {
- text-decoration: none;
- }
- </style>
And here's the php include:
Expand|Select|Wrap|Line Numbers
- <?php include ('menu.php') ?>
And here's the menu.php file
Expand|Select|Wrap|Line Numbers
- <?php echo $active[1] ?><a href=”index.php”>Home</a><br /><br />
- <?php echo $active[2] ?><a href=”portfolio.php”>Portfolio</a><br /><br />
- <?php echo $active[3] ?><a href=”solutions.php”>Solutions</a><br /><br />
- <?php echo $active[4] ?><a href=”advertising.php”>Advertising</a><br /><br />
- <?php echo $active[5] ?><a href=”hosting.php”>Web Hosting</a><br /><br />
- <?php echo $active[6] ?><a href=”resources.php”>Resources</a><br /><br />
- <?php echo $active[7] ?><a href=”contact.php”>Contact</a>