Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS W3C Markup Validation Error for duplicate <div id> that I can't resolve

Gazza58

Coder
Hello

I'm hoping someone can advise where I'm going wrong, I'm cleaning up my website rewriting using PHP and CSS. I've created a new Template that I'm happy with however; I have an error when I run the W3C Markup Validation (validator.w3.org) that I can't seem to fix.

The error is due to the fact that I'm duplicating a <div id> however; if I change the <div id> for the second second instance to a different name, the page does not display correctly

Rather than post lots of code Here are two links showing the issue


This displays correctly but has the validation error due to the duplication of <div id=logo>


This shows no validation errors as I use unique <div id> (logo and logo1); however the logo on the right hand side does not display correctly.

Can anyone suggest what I need to change as it's bugging me

Thanks
 
Rather than post lots of code Here are two links showing the issue

This displays correctly but has the validation error due to the duplication of <div id=logo>

This shows no validation errors as I use unique <div id> (logo and logo1); however the logo on the right hand side does not display correctly.
The logos on the right and left hand side of the page look exactly the same on both pages to me
 
The logos on the right and left hand side of the page look exactly the same on both pages to me
Probably should have explained myself a bit better; on the League History Page the logo sits out of position (no padding) and the div is not filled completely (see screenshot attached)
 

Attachments

  • Capture.JPG
    Capture.JPG
    47.8 KB · Views: 3
Just had another look; displays fine on Opera, Firefox and Edge; just an issue with Google Chrome

Can't explain why
Looks like it was a caching issue as I've cleared my Cache in Chrome and it display fine (also removes the border which isn't in the code and didn't appear with other browsers)

Strange but at least resolved
 
When you develop a website always remember if you are using a localhost or an online vendor, before trying to access your page always refresh your page. Some localhost saves the cache but online vendors always saves the cache, so when you change your web page always try to force refresh your page, just don't refresh. If you will just refresh your change will not display.
 
so when you change your web page always try to force refresh your page, just don't refresh.
Is there an easy way to force refresh the page? Because I've also had this problem before and I don't want to always go to setting to clear cache, or open an incognito window.
 
In Chrome, you can add the Cache Killer extension. If you set it to ON, all pages will be freshly loaded and no page will ever come from the cache. This is really great when you are working on a page and need to do frequent refreshes.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom