...

View Full Version : How would I style this



jumpink
07-24-2007, 07:44 PM
I am trying to style some text and I can't figure it out.
Here is what I am trying to do.

Product Photos(Click to View)

I want this on the same line. But if I style them seperately then it puts them one under the other. I can do it by formating the text directly but then that defeats the purpose of the style sheet.
Thanks

VIPStephan
07-24-2007, 07:50 PM
And how does the HTML look like? The code for the text and the surrounding HTML are important.
If you have something like:


<p>Product Photos (Click to View)</p>

You could wrap one part in a span and style both, the p and the span differently (the span style would overwrite the p style)

jumpink
07-24-2007, 08:03 PM
Thanks a lot! I saw "span" before, but I had never know how it worked.

VIPStephan
07-24-2007, 08:27 PM
Span is a semantically neutral element that has no meaning by itself. Just like div doesn’t do anything by itself. Span is the inline equivalent for the block-level div, so to speak, and it becomes useful if you need to apply a style to inline content like text etc. when elements like <strong> or <em> wouldn’t be the right choice.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum