PDA

View Full Version : Using css in a non VB page?


TomasDR
04-17-2006, 02:36 AM
I am not the best at html/php but based on what I found searching I have gotten quite far I just have two more issues I hope someone could help with.

I was hoping to use my VB CSS with this page I wrote since I included the navbar and footer. I also tried to manually add the colors to the <body> tag but then the page didn't work, I presume due to the javascript.

Worse case (2nd problem) how can I format the navbar to fit the screen, it is about 120% too large so I have horizontal scroll bar on my browser.

I would post the link but it's an adult site so I would prefer to send it by PM.

Thanks in advance

<?php
chdir('/***/forum/');
require_once('./global.php');
eval('$navbar = "' . fetch_template('navbar') . '";');
print $headinclude;
print $header;
print $navbar;
?>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<head>
<title>Learn Spanish</title>
<style type="text/css" id="vbulletin_css"></style>
</head>
<body>
<script language="javascript" src="http://www.donquijote.org/ext/cont/free_pdd.js.asp"> </script> <br><center><a href="http://www.donquijote.org" target="_NEW">Learn Spanish with don Quijote </a></center>
<script language="javascript" src="http://www.donquijote.org/ext/cont/free_lesson.js.asp"> </script> <br><center><a href="http://www.donquijote.org" TARGET="_new">Learn Spanish with don Quijote </a></center>
</body>
</html>
<?php
eval('$footer = "' . fetch_template('footer') . '";');
print $footer;
?>

SixteenOhNine
04-17-2006, 05:03 AM
Would it not be easier to create a page powered by vBulletin as opposed to combining hard-coded PHP and HTML into a single page? There is a wonderful tutorial on how to do just that below :).

https://vborg.vbsupport.ru/showthread.php?t=98009


Worth a read and may help you, in addition to lightening your load.

Toneboy
04-17-2006, 11:06 AM
It looks as if you're not linking to a css file.

Your header should begin something like this:

<?php
chdir('/***/forum/');
require_once('./global.php');
eval('$navbar = "' . fetch_template('navbar') . '";');
print $headinclude;
print $header;
print $navbar;
?>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<head>
<title>Learn Spanish</title>
<LINK rel=stylesheet type=text/css href=http://www.yourdomain.com/styles/style.css>
</head>
<body>

Personally I swept up the css generated in vBulletin and made that into a separate .css file. Works fine with other pages on my site.

TomasDR
04-17-2006, 08:07 PM
Would it not be easier to create a page powered by vBulletin as opposed to combining hard-coded PHP and HTML into a single page? There is a wonderful tutorial on how to do just that below :).

https://vborg.vbsupport.ru/showthread.php?t=98009


Worth a read and may help you, in addition to lightening your load.

Completely missed that thread.

Thank you very much, worked perfectly!

SixteenOhNine
04-17-2006, 09:48 PM
Completely missed that thread.

Thank you very much, worked perfectly!

No problem, thought it would be a bit easier seeing as you could simply update from the Admin CP instead of having to re-upload so many HTML pages.