Nevermind, I fixed it.
I realised after I was editing a backup index, so the links wern't correct.
My solution was to add...
background:url(../images/tab.png) left 50px;
and then use the body id tag for each page. works perfectly now.
Hi tetsuo3, and welcome to WebmasterWorld :)
Pleased you have the issue resolved - and thanks for posting the solution.
Hi No problem,
I decided to start all over again in the end and I have ran into another problem. I'm wondering if anyone can look at my code and tell me a better way to do the header.
This is some basic layout I've started. I've made the header span the width of the page, while the centre content stays aligned in the centre.
Inside the header, I've put another wrapped mini header, which is where I'll put my logo etc (so they'll stay in line with the nav and stuff).
As you can see, my inside header div floats a little to the right, and I can't figure out why.
This is my html for the top part of the site (where my error lies)...
<!-- Begin Header -->
all my logo and stuff goes here inside this centre aligned div.
<!-- End Header -->
<!-- Begin Wrapper -->
<!-- Begin Navigation -->
<li><a id="home" href="index.html">Home</a></li>
<li><a id="work" href="ourwork.html">Repairs</a></li>
<li><a id="testimonials" href="testimonials.html">Testimonials</a></li>
<li><a id="projects" href="projects.html">Custom Projects</a></li>
<li><a id="contact" href="contact.html">Contact Us</a></li>
<!-- End Navigation -->
and this is the css for those bits...
margin: 0 auto;
margin: 0 auto;
margin: 0px 0px 5px 0px;
margin: 0px 0px 0px 0px;
Ok nvm, I'm stupid. I just noticed the code on here, and the #header still has padding. I've changed that and now it lines up to the left fine. Then I just changed the width of the #innerheader to match the rest of the site.
Sorry I keep asking then solving. I'm new at this and constantly experimenting and stuff till it works. But I couldn't figure it out for a while.
Actually. I will have another question. I actually want my navigation on the right hand side, but I can't lock it against the edge of the div. Instead it either overlaps or goes to the line underneath and I can't figure out why either.
The home page should be linked as href="/" and NOT as a named index file.
Always avoid the ../ notation in links. Start the URL with a leading slash.
Hi Thanks for the tips. I didn't know that.
However, I'm having problems with the image links.
If I remove the ../ they stop working.
|If I remove the ../ they stop working. |
He didn't mean simply replace ../ (relative link) with / (site-absolute link). He meant, replace ../ with the full path to the background image, where / is the top-level directory.
www.example.com/images/background.jpg = /images/background.jpg
www.example.com/directory/images/background.jpg = /directory/images/background.jpg
If you are testing your site locally, the leading-slash format will not work in the browser or html preview. You have to install a pseudo-server like WAMP.
Well I've got a major problem. I don't quite understand what links I need. When I upload it to my ftp none of the images work.
My website directory is called web.
Do I link to the the fulladdress... www.mywebsite.co.uk/web/images/blah.png? (i've tried that actually, it doesn't work).
Sorry for such noob questions lol.
Ok nvm, I forgot to upload the images into the ftp. Works now. I'm so stupid sometimes.
Been there. Done that :)