Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My ideas #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

My ideas #2

wants to merge 6 commits into from

Conversation

Cyborgnetical
Copy link

I added my pull request back, thanks for answering. :)

Cyborgnetical and others added 6 commits May 10, 2024 16:06
Made a few changes to the navigation. Turned it into a table and the selected page is now bold. No css added.
<caption>Navigation</caption>
<thead>
<tr>
<td><a href="/The-Little-Taco-Shop">Home</a></td>
Copy link
Owner

@Cheng57 Cheng57 Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link might work on your local machine but does not work on a remote machine. Because the slash ("/") at the beginning of the URL in the "href" makes the path absolute from the root of the website, rather than relative to the current directory. So when I download your code to my computer and place it in a folder of the D: disk (in this case the D: is the root), the browser will look for the file at "D:/The-Little-Taco-Shop" when I click the link, and there is no such file. The solution to this issue is to use a relative path "index.html" as the index.html file is in the same folder with the contact.html file. In this way, the browser would look for the current folder and find the index.html file. Same for the link in the hours.html file.
Screenshot 2024-07-22 124509
Screenshot 2024-07-22 124539

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the way paths work and how github hosts pages this is true, haven't found out a easy way to fix this so adding /The-Little-Taco-Shop to all the urls seems like a good fix.

Copy link
Owner

@Cheng57 Cheng57 Jul 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is to use a relative path as I mentioned.

<li><a href="index.html#Menu">Our Menu</a></li>
<li><a href="hours.html">Store Hours</a></li>
</ul>
<table>
Copy link
Owner

@Cheng57 Cheng57 Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use a table for the navigation, it will look much better by adding a little style="width:100%". HTML tables do not occupy the full length of a page automatically.
Screenshot 2024-07-22 131244

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks better, ill add the changes tomorrow.

@Cyborgnetical
Copy link
Author

Ill add the changes tomorrow as I'm busy with homework. Btw where did you find the idea for the taco shop page? Ive seen multiple other repos with similar info and the same fictional street address. Thanks in advance :D

@Cheng57
Copy link
Owner

Cheng57 commented Jul 27, 2024

That is a project from a HTML tutorial, Learn HTML-Full Tutorial For Beginners 2022 by Dave Gray, on Youtube.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants