Newbie's First Post and Questions
|
| View previous topic :: View next topic |
| Author |
Message |
RVFmal
Joined: 02 Aug 2005 Posts: 2 Location: Bryanston, Gauteng
|
Posted: Tue Aug 02, 2005 10:45 am Post subject: Newbie's First Post and Questions |
|
|
Hey.
I am a newbie (both to this forum and to HTML or website design - whichever you prefer).
I have tried a number of other forums, but to be honest the members were extremely lacklustre in helping and I am hoping that I will find more help here.
Being my first post please understand if I post in the wrong section (being here) as I am having a few issues which I am going to list here. I would appreciate it if you could point me in the right direction of where the relevant queries should be posted.
First off, how do I insert the code of an RSS feed into the HTML of a template that is written in CSS?
How do I centre a page that is meant to be viewed in 800 x 600 resolution so that it appears in the centre of a persons browser if their screens are set larger than 800 x 600?
I am wanting to include a quotes package that is currently Excel based into my site. How do I code it so it appears in HTML and takes on the format of my current site?
I appreciate any help that is forthcoming and look forward to completing my site soon. |
|
| Back to top |
|
 |
|
|
webmaster Site Admin

Joined: 17 Aug 2004 Posts: 3614 Location: Sweden
|
Posted: Tue Aug 02, 2005 1:25 pm Post subject: Re: Newbie's First Post and Questions |
|
|
Hi and welcome to DEVPPL, I hope you will stay here and that we can help you with this questions.
| RVFmal wrote: |
| First off, how do I insert the code of an RSS feed into the HTML of a template that is written in CSS? |
The only way I know is if you do it iwth a PHP-script. (I'm sure it will work with ASP too). To requires that your server supports PHP. I haven't tested it myself but a good pre-made solution for this is MagpieRSS.
How do I centre a page that is meant to be viewed in 800 x 600 resolution so that it appears in the centre of a persons browser if their screens are set larger than 800 x 600?
There are many different ways to do this. You can use HTML Tables like this:
| Code: |
<table width="100%"><tr><td align="center"><table width="800"><tr><td>
the site here
</td></tr></table></td></tr></table> |
I also think this works:
| Code: |
<div align="center"><table width="800"><tr><td>
the site here
</td></td></table></div> |
And I use CSS alot and try to reduce the HTML as much as possible, so this is what I use:
CSS:
| Code: |
div#container {
width: 800px;
position: absolute;
left: 50%;
margin-left: -400px;
} |
HTML:
| Code: |
<div id="container">
the site here
</div> |
And I recomend you make the site 780pixels wide instead of 800pixels. If you have it 800 pixels, the uses with 800x600 resolutions will get a horizontal scroll.
| RVFmal wrote: |
| I am wanting to include a quotes package that is currently Excel based into my site. How do I code it so it appears in HTML and takes on the format of my current site? |
When I've done something like that, I first save the excel document as comma-seperated .csv-file then inport it to me database and then print out the information as I want it with PHP. But I've seen sites that shows a box with excel tables so there must be some way to do it. (Could be that it only works with IE and FF and Opera don't supports it).
Make a Google Search for excel into html. ANd you will probably find the solution. |
|
| Back to top |
|
 |
RVFmal
Joined: 02 Aug 2005 Posts: 2 Location: Bryanston, Gauteng
|
Posted: Tue Aug 02, 2005 1:36 pm Post subject: Re: Newbie's First Post and Questions |
|
|
Cheers WB. Appreciate the prompt response.
Hmm, a new language to learn. Will give PHP a go as my current server supports it. Will Java or Javascript work?
Do you insert the whole site (being the head, body and footer) between the tags for centering? If I opt for the CSS where do I put the container, in the same folder?
Yep have already designed the site so it is 780 as opposed to 800.
I have also seen where you can show the Excel sheet in a box or frame, but I must admit would prefer to incorporate it directly into the site. There are quite a few formulae involved so I am assuming that it would be rather difficult.
How do you import it into your database? Am using MySql and PHP4. |
|
| Back to top |
|
 |
webmaster Site Admin

Joined: 17 Aug 2004 Posts: 3614 Location: Sweden
|
Posted: Tue Aug 02, 2005 9:53 pm Post subject: Re: Newbie's First Post and Questions |
|
|
| Quote: |
| Do you insert the whole site (being the head, body and footer) between the tags for centering? If I opt for the CSS where do I put the container, in the same folder? |
This will work:
| Code: |
<html>
<head>
<title>TEST</title>
<style>
div#container {
width: 800px;
position: absolute;
left: 50%;
margin-left: -400px;
}
</style>
</head>
<body>
<div id="container">
Copy everything between your <body></body> tags here
</div>
</body>
</html> |
For the excel-import into the database, something like this would work.
1. Open your excel document
2. Save As... comma seperated file (.csv)
3. Save it as test.csv
4. Upload it to your server
5. Run this script:
| PHP: |
<?php
include "database_connect.php";
$sFilename= "test.csv";
$nRow = 1;
$handle = fopen ($sFilename,"r");
while ($data = fgetcsv ($handle, 1000, ";"))
{
print "<P>" . $nRow."<br>";
$a = $data[0];
$b = $data[1];
$c = $data[2];
$query = "INSERT INTO `releases` (`a`, `b`, `c`)"
. " VALUES('$a','$b','$c');";
print $query . "<BR>";
mysql_query($query);
print mysql_error();
$nRow++;
}
print "<b>EVERYTHING IS DONE</b>";
fclose ($handle);
?>
|
|
|
| Back to top |
|
 |
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|
|