Change font attributes in the same sentence (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets and Accessibility



Message


Nicole -> Change font attributes in the same sentence (9/12/2005 7:11:56)

I'm really surprised that I haven't needed to do this before now, but I need to put a menu item followed by a brief description on the same line and have the menu item stand out from the description:

Deluxe: beef, chicken, bean or chilli con carne topping.

In other words I'd like the word "Deluxe" to be not only bold, but larger than the other text, which I know is easy to do using <font> tags, but how can it be done using CSS AND kept on the same line as the remaining text?

For instance,, If I class it as a separate <p> or even <h6> or something, as soon as I close that tag the description will appear on the next line?

Nicole




Donkey -> RE: Change font attributes in the same sentence (9/12/2005 7:19:45)

I would use a <span> inside the <p> or <h6> tags, the validator will warn you about nested span tags but it should still validate OK.




Nicole -> RE: Change font attributes in the same sentence (9/12/2005 7:26:49)

thanks!




jaybee -> RE: Change font attributes in the same sentence (9/12/2005 16:38:04)

I use spans for that as well but with a doctype of XHTML transitional I don't get any warnings.

The menu is a css list styled and then I use

<a tabindex="2" href="design.html" title="go to design page">D<span class="shrinknav">esign</span></a>


which gives me a menu button as follows

Design




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875