body{
width: 100%;
height: 100vh;
margin: 0;
background-color: #f5f6f7;
color: #1b1b32;
font-family: sans-serif;
font-size: 16px;
}
h1 , h2, h3, p{
margin: 1em auto;
text-align: center;
}
.center{
margin: auto;
padding: auto;
display: block;
}
.image{
display: block;
max-width: 100% ;
height : auto;
margin : 0 auto;
}
.img{
display: block;
}
Please Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
the test page when I run it tells me that the img element should have a display of block
and the image element should have a max-width of 100% and it should be centred in its parent as far as i can see I have done this or am i wrong?
Welcome back to the forum @henry33
Your .image
class selector has these css properties.
They are not in your img
selector.
Happy coding
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
<<< .image{
display:block;
max-width:100% ;
height :auto;
margin :0 auto;
}
.img{
display:block;
}
tried that and still no joy even changed browsers not getting any where
please post your html too
<<
tribute to Admiral Horatio NelsonAdmiral Horatio Nelson

Portrait of Admiral Horatio Nelson by F L Abbott(1799)
Here is a short time line of Nelsons life.
- Born on the 29 September 1758 at Burnham Thorpe Norfolk Enland to parents Edmond Nelson and his wife Catherine Nelson(nee Suckling) he was named "Horatio" after his godparent, Horatio Walpole 1st earl of Oxford.
- Schooling: Attended Paston Grammer school,North Walsham until age 12 also attened King Edward VI Grammer school,Norwich.
- Naval Carrer began on the 1 January 1771 when he joined as an ordinary seaman on board his uncles ship the third rate HMS Raisonnable.
- Naval Carrer 1771-1780
- Shortly after joining the ship was premoted to midshipman and he began his officer training.Nelson also found out that he suffered from seasickness which he would battle for the rest of his life.
- Nelson joined the Royal Navy at a time of tension with Spain. When this had passed, he was dispached to serve abourd the West Indiaman (merchant navy) Mary Ann to gain sea experience.
- On his return to England in 1772 he requested a posting to the artic expidition looking for the famed North_east passage. He was duly transfered and acted as coxwain of the ship. unable to find a way through the thick ice flows the ship returned to Engald.
- He then sailed for the East indies in september of 1773 abourd HMS Seahorse. Arriving in Madras in 1774.
- HMS Seahorse spent the rest of the year escorting merchant shiping and patrolling the East indes
- With the outbreak of the Frist Anglo-Maratha war in 1775 HMS Seahorse acted as convoy escort in support of the East Inda Company.
- During this time Seahorse was dispached to carry a consinment of company money to Bombay. She was attacked on february 19th by two ketches and drove them of with a brief exchange of gun fire. This was Nelsons first taste of battle.
- Command 1781-1796
- Nelson was given command of his own ship October of 1781
- Marriage.
- Nelson married his wife Frances Nisbett on the 11 march 1787 on the island of Nevis
- Given command of HMS Agameomnon january 1793. French Government declare war on England 1st february 1793.
- Sailing around Mediterainan pursuing French fleet with other British ships.
- battle of Corsica 1794
- battle of Genoa 1795
- during this time loses the sight in his left eye.
- 1796-1801
- promoted to Rear Adiral of the Blue on 20 february 1797
- 1797 loses his right arm below the elbow in the battle of Santa Cruz de Tenerife.
- arrived back in england in september of 1797 to a heros welcome, returned for treatment to his wounds.
- stays at home 1797 due to recovery period
- agitaes for command and is given command of HMS Vangaurd 1798
- 1st August 1798 battle of the Nile
- 1798-1800 Seige of Malta
- returns to england 1800
- Ordered to take command of the mediterranean fleet 1803
- Blockades the french fleet for a year and a half.
- 1805 Battle of Trafalgar and Nelsons death
If you want to learn a more detailed description about Nelson please go to the wikipedia page
Wikipedia page >>> hopes this helps this all passes test only css that is the problem or im doing something wrong.Please enclose your code in triple backticks so people can read it.
```
<html> like this </html>
```
backtick shares a key with tilde ~
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.