<h*>, CSS, and lines

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

mornin'

Let's say I have this code:

[...]

<h3>Bob's Heading:</h3>
Bob's content for Bob's Heading.

[...]
'

That outputs something like this (assuming no CSS interference):

Bob's Heading:
Bob's content for Bob's Heading.
(Content is automatically put in new line)

Now let's say there is a certain other party who has influence over my decision over what I try to make the above look like (by controlling my personal income) and that party makes me decide that the output should look like this:

Bob's Heading: Bob's content for Bob's Heading.
(Content is on the same line as heading.)

Is it possible to do with just CSS? I'm trying to keep content and presentation as separate as possible. Also, I want to use s for SEO. Thus, I want to avoid having to use a and a (as I have it right now), for it defeats the above two goals.

I've tried float:left for , and it works in Moz, but IE messes it up. Sad

Any ideas?

Much appreciated, and apologies if the post doesn't make much sense. Smiling

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

What about making H3 inline instead of block? (and you do have content right? Wink) I haven't tried it, but it's a suggestion for a place to start.

Try looking for information at oreilly.com by Eric Meyer (the CSS Anarchist column) for more details.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

*knocks self on head*

*several times*

Typo killed the stylesheet. "inline" was "inilne". Never code at 6.30 AM without a good night's sleep. Sticking out tongue

Thanks Suzanne. Smiling

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

*chortle* no problem. do this to myself 100x daily. Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.