Shoutbox

HTML Lists - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: HTML Lists (/showthread.php?tid=63115)

HTML Lists by welshboy222 on 07-12-2006 at 04:00 PM

When creating lists I have a problem when I finish a line it goes like this:
1. blah blah blah
2. Same blah
            3. Blah
  4. Blah

It is something to do with the writing because on line three I have less writing than line 1 Dunno how to fix it anyone?


RE: HTML Lists by absorbation on 07-12-2006 at 04:02 PM

The code would help a alot :). Lists can be funny with html, they don't tend to support certain tags within them right.


RE: HTML Lists by welshboy222 on 07-12-2006 at 04:07 PM

lol sorry


<OL>
<LI>In DalaWorld you can chat, Learn and make friends!
<LI>DalaWorld is always here to help when your online!
<LI>DalaWorld was created in 2006!                   
<LI>DalaWorld is based around ranks, people can with certain ranks can do certain things!
</OL>


RE: HTML Lists by absorbation on 07-12-2006 at 04:10 PM

Your <li> tags are not closed. Oh and avoid using capital letters for tags, some browsers (mianly smaller ones), tend not to pick them up, and it is the XHTML valid way to code).

So add </li> after every line containing <li> :).


RE: HTML Lists by Chris4 on 07-12-2006 at 04:10 PM

You havn't ended the <li> tags with </li>

Try this..

code:
<ol>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>

Edit: Too slow :P

Edit2: w3schools.com - HTML Lists
RE: HTML Lists by welshboy222 on 07-12-2006 at 04:11 PM

Ok thanks!


RE: HTML Lists by Felu on 07-12-2006 at 04:12 PM

quote:
Originally posted by absorbation
Your <li> tags are not closed.
quote:
Originally posted by Chris4
You havn't ended the <li> tags with </li>

<LI> tag is an empty element :undecided:. So no need to close them.
RE: HTML Lists by welshboy222 on 07-12-2006 at 04:13 PM

Thanks Felu 4 that!


RE: HTML Lists by welshboy222 on 07-12-2006 at 04:17 PM

Guys its still the same 4 me

ol>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>


RE: HTML Lists by Felu on 07-12-2006 at 04:19 PM

That code works fine with me :undecided:.
Try

code:
<OL TYPE=1>
<LI>bla
<LI>bla
<LI>bla
</OL>

Doesnt make diffrence but just a try.
RE: HTML Lists by welshboy222 on 07-12-2006 at 04:23 PM

Still nothing


ol type=1>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>


RE: HTML Lists by Chris4 on 07-12-2006 at 04:26 PM

quote:
Originally posted by welshboy222
ol type=1>
Remember the '<' ?

code:
<ol type=1>

Read this and this ?
RE: HTML Lists by Thor on 07-12-2006 at 04:28 PM

quote:
Originally posted by -!Felu!-
That code works fine with me :undecided:.
Try
code:
<OL TYPE=1>
<LI>bla
<LI>bla
<LI>bla
</OL>

Doesnt make diffrence but just a try.
That isn't the right way.
code:
<ol>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>

That would be valid HTML
RE: HTML Lists by welshboy222 on 07-12-2006 at 04:29 PM

There still nothing

<ol type=1>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>


RE: HTML Lists by Chris4 on 07-12-2006 at 04:30 PM

quote:
Originally posted by welshboy222
There still nothing

<ol type=1>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>

Well that's the correct way? Are you viewing it in Internet Explorer?

Works fine for me.
RE: HTML Lists by welshboy222 on 07-12-2006 at 04:31 PM

Yes I am I want it to go in a straight line down
1.
2.
3.
4.


RE: HTML Lists by absorbation on 07-12-2006 at 04:31 PM

All tags to render 100% proberly need to be closed at all times, either by using the traling / (<br /> for example) or with another tag (<li></li> for example) :).

Oh and instead of OL, try UL instead.


RE: HTML Lists by -dt- on 07-12-2006 at 04:33 PM

quote:
Originally posted by -!Felu!-
quote:
Originally posted by absorbation
Your <li> tags are not closed.
quote:
Originally posted by Chris4
You havn't ended the <li> tags with </li>

<LI> tag is an empty element :undecided:. So no need to close them.
yes you do you always have to close your tags
RE: HTML Lists by Thor on 07-12-2006 at 04:33 PM

quote:
Originally posted by absorbation
All tags to render 100% proberly need to be closed at all times, either by using the traling / (<br /> for example) or with another tag (<li></li> for example) :).

Oh and instead of OL, try UL instead.
<ul> won't give the lines numbers
<ul> = Undefined list
<ol> = Ordered list
RE: HTML Lists by welshboy222 on 07-12-2006 at 04:33 PM

I'm Confused :p


RE: HTML Lists by Thor on 07-12-2006 at 04:36 PM

quote:
Originally posted by welshboy222
I'm Confused :p
If you want an orderd list (numbers) this would be right
code:
<ol>
<li>First reason</li>
<li>Second reason</li>
<li>Third reason</li>
<li>Fourth reason</li>
</ol>


RE: HTML Lists by stoshrocket on 07-12-2006 at 06:12 PM

hummm... have you got any css for the <li> tags?? that's all i can think that might screw it up...


RE: HTML Lists by welshboy222 on 07-12-2006 at 06:13 PM

I want it so it goes in a straight line down
1. example
2. example
3. example
4. example

This is my code I put:


<ol>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>

It come out like this:


       1. Example
         2. Example
                                3. Example
4. Example




RE: HTML Lists by ayjay on 07-12-2006 at 06:17 PM

quote:
Originally posted by welshboy222
I want it so it goes in a straight line down
1. example
2. example
3. example
4. example

This is my code I put:


<ol>
<li>In DalaWorld you can chat, Learn and make friends!</li>
<li>DalaWorld is always here to help when your online!</li>
<li>DalaWorld was created in 2006!</li>                   
<li>DalaWorld is based around ranks, people can with certain ranks can do certain things!</li>
</ol>

It come out like this:


       1. Example
         2. Example
                                3. Example
4. Example

Yeah, you've said that about 3 times :P
What methos meant was do you have anything at the top of the page in <style> tags to do with li?
RE: HTML Lists by welshboy222 on 07-12-2006 at 06:17 PM

I have a layout in css that I have put it in?


RE: HTML Lists by welshboy222 on 07-12-2006 at 06:20 PM

Well there's
<style type="text/css">
Thats all I have.


RE: HTML Lists by stoshrocket on 07-12-2006 at 06:21 PM

quote:
Originally posted by welshboy222
Well there's
<style type="text/css">
Thats all I have.

*sigh* do you have the page uploaded somewhere so i can have a look see please? I'll see if i can figure this babeh out... 8-)
RE: HTML Lists by Thor on 07-12-2006 at 06:22 PM

quote:
Originally posted by welshboy222
I have a layout in css that I have put it in?
Do you have CSS codes on your page?
Start with an <style type="text/css"> and ends with an </style>

And if you have putted the list on your website, could you give us the link?
RE: HTML Lists by welshboy222 on 07-12-2006 at 06:22 PM

Only in my folder on my computer soz


RE: HTML Lists by welshboy222 on 07-12-2006 at 06:24 PM

The site isn't published yet so no link.


RE: HTML Lists by Thor on 07-12-2006 at 06:29 PM

Well, could you then copy the whole HTML into one post or just upload it as an attachment?


RE: HTML Lists by welshboy222 on 07-12-2006 at 06:31 PM

I think I have it fixed now but thanks Guys for ya suggestions!


RE: HTML Lists by stoshrocket on 07-12-2006 at 06:36 PM

i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:


RE: HTML Lists by Plik on 07-12-2006 at 06:38 PM

quote:
Originally posted by methos
i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:
Just out of interest, why did you need a div?
RE: HTML Lists by Thor on 07-12-2006 at 06:40 PM

quote:
Originally posted by methos
i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:
That's why.. :)

If we knew that in the beginning, it wouldn't be a problem, but it's fixed now. ... 8-)
RE: HTML Lists by welshboy222 on 07-12-2006 at 06:42 PM

Sorry guys I'm not very good but I'm learning! :)


RE: HTML Lists by stoshrocket on 07-12-2006 at 06:43 PM

quote:
Originally posted by Plik
quote:
Originally posted by methos
i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:
Just out of interest, why did you need a div?
because he wanted the list centered but aligned, ie, he wanted the list centered somewhere in the middle but still aligned with each other... a div is just the easiest way of doing it, containing the list within a narrower div, centering the div then left aligning it is the easiest way.... :-/
RE: HTML Lists by Plik on 07-12-2006 at 06:45 PM

quote:
Originally posted by methos
quote:
Originally posted by Plik
quote:
Originally posted by methos
i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:
Just out of interest, why did you need a div?
because he wanted the list centered but aligned, ie, he wanted the list centered somewhere in the middle but still aligned with each other... a div is just the easiest way of doing it, containing the list within a narrower div, centering the div then left aligning it is the easiest way.... :-/

Couldn't you center the ol, and setting the text-align to left?
Nothing much, but you should always work for as little markup as is necessary ;)
RE: HTML Lists by welshboy222 on 07-12-2006 at 06:46 PM

This is a long Thread lol!


RE: HTML Lists by stoshrocket on 07-12-2006 at 06:46 PM

quote:
Originally posted by Plik
Couldn't you center the ol, and setting the text-align to left?
Nothing much, but you should always work for as little markup as is necessary

oh cool, i didnt think of that :P you learn something new everyday... lol
RE: HTML Lists by Thor on 07-12-2006 at 06:47 PM

quote:
Originally posted by Plik
quote:
Originally posted by methos
quote:
Originally posted by Plik
quote:
Originally posted by methos
i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:
Just out of interest, why did you need a div?
because he wanted the list centered but aligned, ie, he wanted the list centered somewhere in the middle but still aligned with each other... a div is just the easiest way of doing it, containing the list within a narrower div, centering the div then left aligning it is the easiest way.... :-/

Couldn't you center the ol, and setting the text-align to left?
Nothing much, but you should always work for as little markup as is necessary ;)
Then he would have to use an inline style, but Mozilla doesn't support all the CSS in inline tags... I've had problems with diffrent objects. But I think that a div would be the best thing. Not an line style.
RE: HTML Lists by welshboy222 on 07-12-2006 at 06:49 PM

I have IE just to let ya know.


RE: HTML Lists by stoshrocket on 07-12-2006 at 06:56 PM

quote:
Originally posted by welshboy222
I have IE just to let ya know.
lol... we've got all the html freaks going on about compatability... Nitro just means that using the method Plik said might not show properly on some browsers... so if someone with Firefox waned to view your page it might not display properly.. :P </explanation>
RE: HTML Lists by Thor on 07-12-2006 at 06:57 PM

quote:
Originally posted by welshboy222
I have IE just to let ya know.
Even though you have IE doesn't mean that the visitor will have IE. IE does not support web standards. Mozilla supports it, but Opera is best there, 'cause it even passes the Acid 2 test.
Always think about how it will be for your visitors. :)
RE: HTML Lists by Plik on 07-12-2006 at 06:57 PM

quote:
Originally posted by Nitrolinken
quote:
Originally posted by Plik
quote:
Originally posted by methos
quote:
Originally posted by Plik
quote:
Originally posted by methos
i sorted it for him... the text was centre aligned so the list was centered as well, and because the lines were different lengths they werent aligned ^_^ solution: create a narrower div, left align the text :happy:
Just out of interest, why did you need a div?
because he wanted the list centered but aligned, ie, he wanted the list centered somewhere in the middle but still aligned with each other... a div is just the easiest way of doing it, containing the list within a narrower div, centering the div then left aligning it is the easiest way.... :-/

Couldn't you center the ol, and setting the text-align to left?
Nothing much, but you should always work for as little markup as is necessary ;)
Then he would have to use an inline style, but Mozilla doesn't support all the CSS in inline tags... I've had problems with diffrent objects. But I think that a div would be the best thing. Not an line style.
List elements are block level.......................................
RE: HTML Lists by Thor on 07-12-2006 at 06:58 PM

quote:
Originally posted by Plik
List elements are block level.......................................
I know that.
RE: HTML Lists by Plik on 07-12-2006 at 07:01 PM

quote:
Originally posted by Nitrolinken
quote:
Originally posted by Plik
List elements are block level.......................................
I know that.
Then what does:
quote:
Originally posted by Nitrolinken
Then he would have to use an inline style, but Mozilla doesn't support all the CSS in inline tags
mean?

I've never had issues with positioning ul's and ol's the same way you would a div, because they are both block level. The only issue is that lists generally have padding and margins by default, which cause issues if you don't expect it.
RE: HTML Lists by Thor on 07-12-2006 at 07:55 PM

quote:
Originally posted by Plik
quote:
Originally posted by Nitrolinken
quote:
Originally posted by Plik
List elements are block level.......................................
I know that.
Then what does:
quote:
Originally posted by Nitrolinken
Then he would have to use an inline style, but Mozilla doesn't support all the CSS in inline tags
mean?

I've never had issues with positioning ul's and ol's the same way you would a div, because they are both block level. The only issue is that lists generally have padding and margins by default, which cause issues if you don't expect it.
Oh, well, I was trixing with inline style using the p tag, and firefox wouldnt' color my text, it wouldn't add the font either. And I didn't understand, but I kept on working with it. The site that I were doing tthe code, was a profile site, a norwegian service. In IE and Opera the site looked excatly as It should. I didn't want to use <font> tag, I don't like it. (:P) So I used the inline style, as I said, and the text looked not as it should, in Mozilla (I mean firefox).

:) That's what I meant.