Streaming live at 10am (PST)

My empty DIV doesn't take the dimensions I give it


#1

I have a couple of clearing divs that, when I opened by site up today, they are showing like default divs, rather than having a 0px height.

Fortunately, they're rendering correctly on the published site, but it makes for difficult layout on the working side. Clicking on the "Hide Empty Divs" doesn't work on these either. I'm presuming that's because they've actually been styled?

Anyway, I'd appreciate someone checking into this. Here's an example. Both divs are the same: Class = ".clear_both" width=100% and height=0px. Position and float are the only other styles applied.

https://preview.webflow.com/preview/horizonstaging?preview=0a6d36646617aa6f7103988eb54a4bde

This was not an issue before this morning. Not sure what's going on.
Thanks.


#2

The div is actually zeroed OK. What you see is only ebflow designer giving the div a default height just for you to be able to put things in it. But if you publish the site you'll see the div is zeroed. Notice the dash border + inner gray border, that means it's a "default" style for webflow designer only.


#3

@vincent,
Yes, I realize this looks like a default div, but default divs do not have any height applied. When I apply a class with a height of 0, it should collapse and do it's job to clear, and not show any height at all.

As I said, it was rendering correctly in designer view yesterday, and it renders fine on published site, but trying to lay out elements precisely with this gaping div is not good.


#4

Yep I think it happens for some reason, don't know why. Maybe you should ditch this dic and start with another one and a new class.


#5

Already tried. Applying any height but 0 works, but for some reason, all of a sudden, having a height of 0px goes back to the default height.

I'm not sure why this was moved out of "bugs" either, because this is definitely something not right. :\


#6

And now I'm not sure what's going on. Both of my "clear_both" classes with a height of 0 have collapsed, but the test divs I was applying 0px height to have not collapsed. Sigh. Hopefully, it will all go back to normal. :slightly_smiling:


#7

Aha you got me confused. I tried it. True. 1px works, 0 px doesnt. I'm confused because I can't remember if I ever tried to zero an empty div... So I don't know if it's a new thing, a bug, or just a normal thing.


#8

Yeah, not sure what's going on. I've always set clearing divs to height:0px, and they collapse. Like I said, it was working fine yesterday... today, this is going on. And now, the originals are back to showing height... grrr. Right now, I've had to move on to other things, but I'll write directly to support later on to look into this.


#9

Ok, so something has changed...

@cyberdave I'll let you with this, if you can tell us if it's a change that we have to live with or something else.


#10

@vincent,
For the time being, I've re-set the areas where there once were clearing divs and have now wrapped them in a div I've styled as "overflow:auto." This is doing the trick for now, but I can't help wonder what happened with the 0px height.


#11

Or just give it overflow hidden, 0px and put another blank div inside it. Does the job.


#12

It might be because the "show empty elements" is toggled on, if you turn this off it should collapse like it used to.

Hope this helps!


#13

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.