Jump to content

Question about html...


Kiradikash

Recommended Posts

Hello Everyone,I have a quick question about HTML coding. I am working on a website. I have my pages set up, and the frames in. But I can't figure out how to put a space between links on the same line. For example...lets say I have 5 links... "Home Page", Page 1", "page 2", "Page 3", and "Page 4". When I put the HTML coding for them on my page they ended up looking like..."Home Page""Page 1""Page 2""Page 3""Page 4"How do I get them to look like..."Home Page" "Page 1" "Page 2" "Page 3" "Page 4"I have tried using the number entity for a space ( ) without the braces of course...but I can't get it to work. If you would like me to send you a copy of my coding I can. I just want the links to be along the top of my page so they can get to them from that page. (already have a nav bar on the left...long story)Could anyone pelase help me? Any help would be greatly appreciated! Thanks ahead of time for any help you can give.Sincerely,Kiradikash

Link to comment
Share on other sites

Have you tried using  ?

link1   link2   link3   link4   link5

or or a <table>

<table width="100%"><tr><td>link 1<br></td><td>link 2<br></td><td>link 3<br></td><td>link 4<br></td><td>link 4<br></td></tr></table>

Link to comment
Share on other sites

Hello,Thanks to those who helped. I used the   to make a sapce and it worked. I had one more question though. Is it bad coding to use more then one of them at a time? like...      ... to make the space bigger? I used it more than omce...but if it's bad coding, I'll have to figure out another way to make the spaces bigger.Thank you all for answering my question! It helped me alot. :-)Sincerely,Kiradikash

Link to comment
Share on other sites

Hello,Thanks to those who helped. I used the   to make a sapce and it worked. I had one more question though. Is it bad coding to use more then one of them at a time? like...      ... to make the space bigger? I used it more than omce...but if it's bad coding, I'll have to figure out another way to make the spaces bigger.Thank you all for answering my question! It helped me alot. :-)Sincerely,Kiradikash

That's a very good question. I'd, personally, say that if you are using more than 3 non-breaking spaces ( ) then you should try to figure something else out. IE and Firefox, for instance, will render the amount of space slightly differently. That alone is a good enough reason to figure out why the code you created is having a hard time rendering the design.
Link to comment
Share on other sites

Hello,I'm only using 3 of the   between the links. It looks nice the way I did it. I even tested it in Mozilla...and it looks fine. I just didn't know if it would be considered bad coding to use more than one of the   at a time.Thanks for all the help everyone! You're all so great! :-D I hope I can return the favor sometime.Sincerely,Kiradikash

Link to comment
Share on other sites

ok well I am a fan of the   as much as the next person but in a table wouldnt it just be easier to do something like:<table border='0' cellpadding='5' align='center'>as the cell padding will put spaces in for youi have a javascript for the kind of links your talking about

document.write("<table border='0' cellpadding='5' align='center'>");document.write("<h5>");document.write("<tr>");document.write("<td><a href='http://briansplace.fcpages.com'>Back to Main Page</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/raceskills.html'>Race/Skills List</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/patriotpub.html'>Dragonball Evolution Member Pics</a></td>");document.write("</tr><tr>");document.write("<td><a href='http://www.geocities.com/toalinree/'target='_blank'>Dragonball Evolution Website</a></td>");document.write("<td><a href='http://jail-bait.net/dbe/'target='_blank'>Dragonball Evolution Forum</a></td>");document.write("<td><a href='http://pub36.bravenet.com/forum/3074625174'target='_blank'>Comments about this site</a></td>");document.write("</tr>");document.write("</tr></table>");document.write("<center>Send your pictures to <i>Brian5@email.com</i></center>");document.write("</h5>");

and it works greatand yes i know there is an easier way to write a javascript without making so many write.documents but it never works for me if i add more than 1 maybe 2 things in each :)

Link to comment
Share on other sites

ok well I am a fan of the   as much as the next person but in a table wouldnt it just be easier to do something like:<table border='0' cellpadding='5' align='center'>as the cell padding will put spaces in for youi have a javascript for the kind of links your talking about
document.write("<table border='0' cellpadding='5' align='center'>");document.write("<h5>");document.write("<tr>");document.write("<td><a href='http://briansplace.fcpages.com'>Back to Main Page</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/raceskills.html'>Race/Skills List</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/patriotpub.html'>Dragonball Evolution Member Pics</a></td>");document.write("</tr><tr>");document.write("<td><a href='http://www.geocities.com/toalinree/'target='_blank'>Dragonball Evolution Website</a></td>");document.write("<td><a href='http://jail-bait.net/dbe/'target='_blank'>Dragonball Evolution Forum</a></td>");document.write("<td><a href='http://pub36.bravenet.com/forum/3074625174'target='_blank'>Comments about this site</a></td>");document.write("</tr>");document.write("</tr></table>");document.write("<center>Send your pictures to <i>Brian5@email.com</i></center>");document.write("</h5>");

and it works greatand yes i know there is an easier way to write a javascript without making so many write.documents but it never works for me if i add more than 1 maybe 2 things in each  :)

The <h5> tag is nested incorrectly in this example. And I am not clear why you're using javascript to output a simple <table>. There doesn't seem to be a point to it - can you elaborate why one would use this method? :)
Link to comment
Share on other sites

Instead of using &nbps;, you should use CSS word-spacing property.If your words are items in a list, use a <ul> and with CSS, make it "list-style-type: none" and the <li>s inside that list "display: inline" and use margins to separate them.

Link to comment
Share on other sites

The <h5> tag is nested incorrectly in this example.  And I am not clear why you're using javascript to output a simple <table>.  There doesn't seem to be a point to it - can you elaborate why one would use this method? :)

well i think you or somebody asked me this question allready but, im using the javascript so that i can call that same bottom link to multiple pages, without having to change multiple pages when the links change, (if there is another way let me know) and how is the <h5> supposed to be in that caode i posted?
Link to comment
Share on other sites

document.write("<table border='0' cellpadding='5' align='center'>");document.write("<h5>");document.write("<tr>");document.write("<td><a href='http://briansplace.fcpages.com'>Back to Main Page</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/raceskills.html'>Race/Skills List</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/patriotpub.html'>Dragonball Evolution Member Pics</a></td>");document.write("</tr><tr>");document.write("<td><a href='http://www.geocities.com/toalinree/'target='_blank'>Dragonball Evolution Website</a></td>");document.write("<td><a href='http://jail-bait.net/dbe/'target='_blank'>Dragonball Evolution Forum</a></td>");document.write("<td><a href='http://pub36.bravenet.com/forum/3074625174'target='_blank'>Comments about this site</a></td>");document.write("</tr>");document.write("</tr></table>");document.write("</h5>");document.write("<center>Send your pictures to <i>Brian5@email.com</i></center>");

Either that, which will not make the "Brian5@email.com" a heading, or this:

document.write("<h5>");document.write("<table border='0' cellpadding='5' align='center'>");document.write("<tr>");document.write("<td><a href='http://briansplace.fcpages.com'>Back to Main Page</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/raceskills.html'>Race/Skills List</a></td>");document.write("<td><a href='http://briansplace.fcpages.com/patriotpub.html'>Dragonball Evolution Member Pics</a></td>");document.write("</tr><tr>");document.write("<td><a href='http://www.geocities.com/toalinree/'target='_blank'>Dragonball Evolution Website</a></td>");document.write("<td><a href='http://jail-bait.net/dbe/'target='_blank'>Dragonball Evolution Forum</a></td>");document.write("<td><a href='http://pub36.bravenet.com/forum/3074625174'target='_blank'>Comments about this site</a></td>");document.write("</tr>");document.write("</tr></table>");document.write("<center>Send your pictures to <i>Brian5@email.com</i></center>");document.write("</h5>");

Link to comment
Share on other sites

well i think you or somebody asked me this question allready but, im using the javascript so that i can call that same bottom link to multiple pages, without having to change multiple pages when the links change, (if there is another way let me know) and how is the <h5> supposed to be in that caode i posted?

Couldn't you use SSI (Server Side Includes)? A server side include can be done in ASP or PHP and really just allows you to write the HTML file for the menu only. Then in your page you would place a SSI where you want the menu code to be and it includes it there for you :) Now whenever you need to make a change to a part of the menu, you just change it in the menu file and it will automatically be updated wherever you use the SSI.
Link to comment
Share on other sites

Hi Kiradikash,Please look at the following code. Similarly you could apply the logic into your code.<html><body><a href="abc.htm" target="_blank">homepage</a> <a href="hello.htm" target="_blank">page1</a> <a href="red.htm" target="_blank">page2</a> <a href="pink.htm" target="_blank">page3</a></body></html>

Hello Everyone,I have a quick question about HTML coding. I am working on a website. I have my pages set up, and the frames in. But I can't figure out how to put a space between links on the same line. For example...lets say I have 5 links... "Home Page", Page 1", "page 2", "Page 3", and "Page 4". When I put the HTML coding for them on my page they ended up looking like..."Home Page""Page 1""Page 2""Page 3""Page 4"How do I get them to look like..."Home Page"  "Page 1"  "Page 2"  "Page 3"  "Page 4"I have tried using the number entity for a space ( ) without the braces of course...but I can't get it to work. If you would like me to send you a copy of my coding I can. I just want the links to be along the top of my page so they can get to them from that page. (already have a nav bar on the left...long story)Could anyone pelase help me? Any help would be greatly appreciated! Thanks ahead of time for any help you can give.Sincerely,Kiradikash

Link to comment
Share on other sites

well i think you or somebody asked me this question allready but, im using the javascript so that i can call that same bottom link to multiple pages, without having to change multiple pages when the links change, (if there is another way let me know) and how is the <h5> supposed to be in that caode i posted?

You have the opening <h5> tag between the <table> and <tr> tag but the closing </h5> tag after your closing </table> tag. Its just not the right place for it, sequentially. Either move the beginning <h5> tag to be before the opening <table> tag so it conincides with the placement of the closing </h5> tag, or but the closing </h5> tag just before the closing </table> tag.In any case, its a moot point - since the properties of the <h5> tag will not be applied to the contents of the <td> if I remember correctly.And thanks for the explanation as to why you would use the javascript in this manner. Its very creative and if you do not have SSI capabilities, then its a good solution. :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...