Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thequicksilver

macrumors 6502a
Original poster
Sep 19, 2004
789
17
Birmingham
This is pretty basic stuff, so I apologise for taxing you.

Simply put, I have a Movable Type blog. I've made an entry today where I've wanted to both bold and italicise a few paragraphs of the text. Though my raw entry only included the <b> and <i> tags, the source code for this part of the entry reads thusly:

Code:
<p><i><b>"Microsoft's biggest worry, though, should be the huge success of Mozilla Firefox, the open source web browser.</p>

<p>Faster and more secure than Internet Explorer, it is the first browser to seriously challenge Microsoft's dominance.</p>

<p>In just nine months Firefox has chalked up 50 million downloads, although some are admittedly upgrades.</p>

<p>Bill Gates is one of the people with Firefox on his computer, so I asked him for his opinion.</p>

<p>"I played around with it a bit, but it's just another browser, and IE [Microsoft's Internet Explorer] is better," Mr Gates told me, and challenged my assertion that Firefox's 'market share' is growing rapidly.</p>

<p>"So much software gets downloaded all the time, but do people actually use it?" he argued."</b></i></p>

In Firefox and other browsers, it bolds and italicises all of the paragraph, but Safari sees issues. (See attached screenshots.)

Can anyone advise as to whether or not this is an issue with my HTML, Safari's rendering, or something completely different? And, short of putting a <b> and <i> tag around every paragraph, can it be rectified?

Thanks. :)
 

Attachments

  • firefox.jpeg
    firefox.jpeg
    55.8 KB · Views: 143
  • safari.jpeg
    safari.jpeg
    42 KB · Views: 109
I don't know if this is the solution, but it's better to open and close the <b> and <i> tags within each block, ie within each paragraph. It's a bit of a hassle, but it's much cleaner.

You can also create a 'bold-italic paragraph' class in CSS...

in the header:
Code:
<style type="text/css" media="screen">

.bold-italic{
font-weight: bold;
font-style: italic}

</style>

Now each time you want a 'bold-italic paragraph', just start said paragraph with:
Code:
<p class="bold-italic">


Hope this helps :)
 
Thanks for the heads up. I've added the bold and italic tags to each sentence now, and it renders fine in Safari. It just surprises me that it worked fine before in all other browsers I tried it in (Firefox Mac/Windows, Camino, IE Mac/Windows) yet failed in KHTML browsers.

Anyway, fixed now, so no harm done. :) Thanks for the CSS heads up, though I won't implement it as I'll never ever remember it when making my entries.
 
thequicksilver said:
Thanks for the heads up. I've added the bold and italic tags to each sentence now, and it renders fine in Safari. It just surprises me that it worked fine before in all other browsers I tried it in (Firefox Mac/Windows, Camino, IE Mac/Windows) yet failed in KHTML browsers.

Anyway, fixed now, so no harm done. :) Thanks for the CSS heads up, though I won't implement it as I'll never ever remember it when making my entries.

Your tags were nested wrong and that is why placing the bold and italic tags inside each p tag worked. Alternatively you could have just moved your open tags before the first <p> and moved your closing tags outside the last <p>

Code:
<i><b><p>"Microsoft's biggest worry, though, should be the huge success of Mozilla Firefox, the open source web browser.</p>

<p>Faster and more secure than Internet Explorer, it is the first browser to seriously challenge Microsoft's dominance.</p>

<p>In just nine months Firefox has chalked up 50 million downloads, although some are admittedly upgrades.</p>

<p>Bill Gates is one of the people with Firefox on his computer, so I asked him for his opinion.</p>

<p>"I played around with it a bit, but it's just another browser, and IE [Microsoft's Internet Explorer] is better," Mr Gates told me, and challenged my assertion that Firefox's 'market share' is growing rapidly.</p>

<p>"So much software gets downloaded all the time, but do people actually use it?" he argued."</p></b></i>

PS. A quick run through http://validator.w3.org/ would have exposed this and saved you some pain.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.