WebSite X5Help Center

 
Luke G.
Luke G.
User

HTML/CSS issues  en

Автор: Luke G.
Просмотрено 2123, Подписчики 1, Размещенный 0  

HI Guys

In my html box i have the following code

<!DOCTYPE html>
<html>
<head>


</head>
<body>

<p>Example of unordered lists:</p>
<ul class="a">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<ul class="b">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<p>Example of ordered lists:</p>
<ol class="c">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ol>

<ol class="d">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ol>

</body>
</html>

In the expert section i have the following css

<style>
ul.a {
list-style-type: circle;
}

ul.b {
list-style-type: square;
}

ol.c {
list-style-type: upper-roman;
}

ol.d {
list-style-type: lower-alpha;
}
</style>

However when i preview the page none of the css is working.

How ever when i run it from Notepadd ++ it works perfect so i know its not a problem with the code   

Размещено
4 Ответы - 1 Корректно
Paul M.
Paul M.
Moderator

Hello Luke,

You need to remove the html, head and body tags as WebSite X5 inserts these automatically in the correct place in your web page source code.

Kind regards,

Paul

Читать больше
Размещено От Paul M.
Luke G.
Luke G.
User
Автор

Hi Paul

Thank you for the feed back however it hasnt fixed my issue.

Luke

Читать больше
Размещено От Luke G.
Luke G.
Luke G.
User
Автор

HTML now looks like this

<p>Example of unordered lists:</p>
<ul class="a">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<ul class="b">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>

<p>Example of ordered lists:</p>
<ol class="c">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ol>

<ol class="d">
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ol>

Читать больше
Размещено От Luke G.
 lemonsong  
 lemonsong  
User

Hi,

remove the style tags in CSS code and add this:

ul, ol {
   padding-left: 40px;
   margin: 16px 0;
}

Читать больше
Размещено От  lemonsong