Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

what is wrong with the below code

New Here ,
Jan 14, 2016 Jan 14, 2016

<div class="container discover_sec">

<div class="wrapper">

<h2>Discover OCTAL</h2>

<div class="discover 1">a href="/Sustainability/Health-Safety"&gt;

<img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal.png" /> &lt;/href="http:&gt;</div>

<div class="discover2">

<ul>

    <li>

    <a title="Sustainability" href="/Sustainability/Health-Safety">

    <span class="discover_image"><img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal4.png" /></span>

    <span class="inside_discover">

    <span class="heading">sustainability</span>

    <span class="content">OCTAL has the Lowest Carbon Footprint</span>

    <span class="find">find out more</span>

    </span>

    </a>

    </li>

    <li>

    <a title="Innovation" href="href=">

    <span class="discover_image"><img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal5.png" /></span>

    <span class="inside_discover">

    <span class="heading">innovation</span>

    <span class="content">A state-of-the-art plant</span>

    <span class="find">find out more</span>

    </span>

    </a>

    </li>

    <li>

    <a title="Discover OCTAL" href="http://octal.cms.trafficdemos.com/Why-OCTAL/Global-Compliance">

    <span class="discover_image"><img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal6.png" /></span>

    <span class="inside_discover">

    <span class="heading">Discover OCTAL</span>

    <span class="content">What sets us apart form pthers?</span>

    <span class="find">find out more</span>

    </span>

    </a>

    </li>

</ul>

</div>

<div class="discover3"> <a href="http://octal.cms.trafficdemos.com/Media-Center/media_gallery"><img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal2.png" /> </a><a href="http://octal.cms.trafficdemos.com/Media-Center/media_gallery"><img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal3.png" /></a> </div>

</div>

</div>

937
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 14, 2016 Jan 14, 2016

The code should look like this:

<div class="discover1"><a href="/Sustainability/Health-Safety">

<img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal.png" /> </a></div>

Translate
Community Expert ,
Jan 14, 2016 Jan 14, 2016

Lines 4 and 5 (right after the spaces at the top) are malformed. You're missing an opening < for your a href and it looks like it was pasted in Design View as text so the brackets got changed to & codes

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2016 Jan 14, 2016

Hello Jon,

yes apparently it happened by mistake and i didn't have a backup and i tried to fix it but it didn't work, am not an expert, i tried to add < as you said but it didnt change anything, the image went missing :s so i reverted back to the previous code up

Welcome to OCTAL

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 14, 2016 Jan 14, 2016

The code should look like this:

<div class="discover1"><a href="/Sustainability/Health-Safety">

<img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal.png" /> </a></div>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 14, 2016 Jan 14, 2016

I noticed that you have a space between discover and 1 in the class name. That means apply two classes, discover and 1, but you can't have a number on its own as a class name.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2016 Jan 14, 2016

thanks David!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 14, 2016 Jan 14, 2016

Change...

<div class="discover 1">a href="/Sustainability/Health-Safety"&gt;

<img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal.png" /> &lt;/href="http:&gt;</div>

to

<div class="discover 1"><a href="/Sustainability/Health-Safety">

<img alt="" src="/portals/0/ModuleContent/Discover%20OCTAL/discover_octal.png" /></a></div>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2016 Jan 14, 2016

Thanks Jon

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2016 Jan 26, 2016
LATEST

I realize I'm late to this party but I thought I'd mention it anyway. 

You have a space between Discover and OCTAL.  In HTML5 docs, this is invalid.

Discover%20OCTAL

You should avoid spaces on the web as they get translated into %20 entities.  Also, Camel Case naming conventions can come back to bite you later.  Linux servers are case sensitive.  For best results, find a naming convention you can repeat and stick to it.  Either all UPPER or all lower case, no spaces, no special characters.  But hyphens- and underscores_ are OK.

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines