<span class="field-content"><p>...

cannot reside an inline element.

View W3C data here: W3C validator

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

This isn't fixable. If you're putting in block level fields and you care about w3c validation, you'll have to override the theme and change it on an individual basis.I can't wrap it in a div because it might NOT be a block element, and I can't wrap it in a span because it might be a block element and I have to wrap it in something to get a class.

So it can only be fixed via theming.

Setzler’s picture

Status: Closed (won't fix) » Active

Couldn't you wrap everything in a DIV and set the class to display: inline/block, depending on what the user selects for that item? Block items can go in other blocks, but blocks can't go inside inline items, so why not make everything go in a block and use CSS to control the display?

samirnassar’s picture

From a markup perspective you cannot just wrap everything in a div element since div is block level. The CSS properties, display: [block|inline]; are only that, CSS properties and only have a bearing on the display of markup.

Inserting block level elements into inline elements is invalid markup.

Setzler’s picture

Fair enough. But what about an option for each text element for display type?

samirnassar’s picture

After re-reading the comments. Is there ever a time a view is not a block-level entity? This is to distinguish it from being a block in Drupal parlance vs. being block-level in markup parlance. Unless you you have a one-liner view is there a reason not to wrap it in a div element?

merlinofchaos’s picture

Not the view, an individual field within a view.

samirnassar’s picture

Gotcha, sorry for the noise.

merlinofchaos’s picture

Status: Active » Fixed

Fix committed. This might be a little tricky.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

seanr’s picture

Version: 6.x-2.0-rc1 » 6.x-2.6
Status: Closed (fixed) » Active

I'm still seeing this bug in the current version for embedded video fields even though their not set to inline. Does something need to change in the emvideo module or is there still a bug in views?

merlinofchaos’s picture

Status: Active » Fixed

This should be up to the module to set its fields up properly.

seanr’s picture

OK, will check there then. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

yonailo’s picture

Hi,

What about overriding the default element type not only for being displayed as inline ?

Right now you can set up if you want the element to be displayed with a SPAN, but there is no method for forcing the field to be displayed as a block.

I have experienced the same problem as #10 with a "user: picture" field, which by default displays itself as inline.
Therefore we would have to handler three cases: forcing it as inline, forcing it as block, or leaving its default behaviour.

(Maybe I am missing something because I am not a D6 guru - yet)

tobiberlin’s picture

Isn't it possible to override the theme function? I thought these HTML things are put into a theme function which can be overriden in template.php?!

merlinofchaos’s picture

Yes, all of Views output can be overridden with theming.

yonailo’s picture

Ok, thank you for your answers.... after reading #1 I see it clearly that it must be done with theme overriding.... but then I still get confused about why it is implemented the option for forcing a field as inline...because this could also have been done with theming, ¿right?