简体   繁体   中英

My HTML website looks completely different on other users devices

My html website looks so different on other devices, as in it looks perfect on mine, but when my friend opens the link, the containers are completely out of place and the images I have wont load. I really need this done and its messing me up.

This is the link to my website: http://webdev.edinburghcollege.ac.uk/~HNCSOFTSA5/effc/register.php

This is what my friend see's: https://media.discordapp.net/attachments/485067625689514005/702930803574964296/unknown.png?width=1204&height=677 )

And this is what i can see: https://imgur.com/jbtpPdr

Once again, I'd appreciate any help

Right off the bat, it looks like the markup and CSS for container2 is a little weird.

Your HTML

<div img="" src="fifepin.png" class="container2">

Try this HTML

<div class="container2">

Your CSS

.container2 {
    background-color: #595959;
    padding: 30px 60px;
    background: src="img/fifestad.jpg";
    background-position: auto;
    background-repeat: repeat no-repeat;
}

Try this CSS

.container2 {
    background-color: #595959;
    padding: 30px 60px;
    background: url("img/fifestad.jpg"); /* reference is off */
    background-position: auto;
    background-repeat: repeat no-repeat;
}

You're missing your closing tag to your <p> on line 128 . This may be causing your unpredictable rendering issues on different browsers and devices.

There should also be white space after your placeholder attribute values in your input elements (line 78 and 86).

Also, the align attribute is obsolete. You should be using css to style whenever possible.

Try running your code through an HTML Validator to troubleshoot your many potential issues.

Add this to your head if it's not there already:

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM