LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2005, 09:37 PM   #1
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Rep: Reputation: 30
<br> tag


I have a piece of HTML like this:

Code:
<table>
<tr>
<td>
<font face="lucinda" size="4"><li>Test1</li><br><li>Test2</li><br><li> Test3</li></font>
</td>
</tr>
</table>
In firefox I get the desired result with a line break between each bullet point:

>Test1

>Test2

>Test3

but in internet explorer I don't get the line break:

>Test1
>Test2
>Test3

Can anyone see anything wrong with my code that could be causing this?

Thanks,
Paddy
 
Old 12-08-2005, 09:50 PM   #2
mfrick
Member
 
Registered: Sep 2004
Location: Perth
Posts: 51

Rep: Reputation: 15
whoops origninal ans was wrong as read it the wrong way around ie that you wanted it the explorer way not the firefox way.

Last edited by mfrick; 12-08-2005 at 09:52 PM.
 
Old 12-08-2005, 09:54 PM   #3
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
Ha ha so any ideas? Shouldn't it give the same result in both browsers?

Paddy
 
Old 12-08-2005, 09:55 PM   #4
mfrick
Member
 
Registered: Sep 2004
Location: Perth
Posts: 51

Rep: Reputation: 15
seems a bit dodge but this should work ...

Code:
<table>
<tr>
<td>
<font face="lucinda" size="4"><li>Test1<br>&nbsp</li><li>Test2<br>&nbsp</li><li>Test3</li></font>
</td>
</tr>
</table>
never really looked into exactly why some browsers act differently to others but would assume some have strayed from the standards originally laid down in regard to how to handle certain html tags where as others are adhering to the standard.

Last edited by mfrick; 12-08-2005 at 09:57 PM.
 
Old 12-08-2005, 09:56 PM   #5
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
Thanks, what does &nbsp mean?

Paddy
 
Old 12-08-2005, 10:00 PM   #6
mfrick
Member
 
Registered: Sep 2004
Location: Perth
Posts: 51

Rep: Reputation: 15
Quote:
Originally Posted by paddyjoy
Thanks, what does &nbsp mean?

Paddy
it is a non-breaking space so basically on the 2nd line now (after the br) there is a space printed so it forces both browsers to display that line as if there was text there except of course the space isn't visible.
 
Old 12-08-2005, 10:00 PM   #7
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
There is quite a bit wrong with that code I'm afraid. It uses list items without an actual list and you should be using <span> rather than <font>. Try this, see if you get better results. Even if it turns out the same, you'll have a stronger base to work from. CSS is wonderful, really.
Code:
<style type="text/css">
body {
  font: Lucinda;
  font-size: 12pt;
}

li {
  margin-bottom: 1em;
}
</style>
<table>
  <tr>
    <td>
      <ul>
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
      </ul>
    </td>
  </tr>
</table>
 
Old 12-08-2005, 10:14 PM   #8
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
Very good thanks for that. Using the <style> work perfectly in both browsers!

Paddy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ID3 Tag editor? diam0nd Linux - Software 5 06-09-2006 02:24 PM
cvs tag remove lordofring Programming 2 10-27-2005 03:30 PM
ID3 tag progam Bomb187 Linux - Software 3 03-18-2004 04:57 PM
Directory tag changes does nothing different robertoneto123 Linux - Networking 1 03-07-2004 11:10 AM
Platform tag Citizen Bleys Linux - General 1 09-13-2001 07:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration