:target height and <em>

I have two problems with
http://fixmysite.us/coronadoshores/service/#tab-1

How can I change the height of each of the content divs so its variable (height depends on whats inside) cause there seems to be no height unless I give the :target a height of 300px;
Lastly I have 2 <em>son the right side in 2 of the items, how do I make it on a new line (within that span)

Thanks…

Don’t think you can. Maybe JS would be a better option.

Lastly I have 2 <em>son the right side in 2 of the items, how do I make it on a new line (within that span)

You could use display: block; if you want it fully on a separate line.

span em {display: block;}

Can’t you just set height: auto; on :target instead of a fixed height?

Dang, I though I tried that and it failed, but indeed it seems to work. :slight_smile:

Sounds good :slight_smile: I only tried it in Firebug and didn’t really look much at the code, so I wasn’t sure if you’d already tried it and found that it couldn’t be used in this case for whatever reason.

No you can’t do that because then you will lose the transition effect as transitions don’t work to auto heights - which perversely is exactly how you want them to work most of the time. It’s the same problem I ran into with this demo from a recent quiz.

Ah, I didn’t even consider the transitions. Kinda sucks that it can’t be done that way :frowning:

Yes, I don’t know what they were thinking as that is the exact behaviour you want most of the time:(

ok, thanks anyway though