6 replies [Last post]
randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 15 years 22 weeks ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

I have two <p>'s inside of a <div>, one <p> on the left, and the other in the right. If I have something in the right, the <div> will wrap around and encompass it, but if the left <p> is longer it doesn't work.

If you could take a look that would be great, and you'll be able to see what I'm talking about.

Correctly working:
http://georgio.pcplayground.com/bonus.html

Not so correctly working:
http://georgio.pcplayground.com/bonus2.html

CSS:
http://georgio.pcplayground.com/css2.css

Edit: Forgot to mention that I'm referring to FF, working fine in IE.

HellsBells
HellsBells's picture
Offline
Leader
Bedford, UK
Last seen: 12 years 14 weeks ago
Bedford, UK
Joined: 2004-04-07
Posts: 851
Points: 0

&lt;div&gt; not wrapping correctly.

Hi there

Have a look at this article on Alistapart: http://www.alistapart.com/articles/practicalcss/ and scroll down a bit till you get to the thumbnails within the grey area - I think this might be an answer.

My strategy is so simple an idiot could have devised it!

"Also, your CSS (no offence) makes me want to gouge my eyes out with a rusty spoon" - TPH

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 15 years 22 weeks ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

&lt;div&gt; not wrapping correctly.

That helps, but I can't quite seem to apply it to my situation.
That situation is for overflowing things on a page, like different numbers of <div>'s will show up depending on browser width, but I want only 2 to show up on each row.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

&lt;div&gt; not wrapping correctly.

replace .updates {height: 1%;} with {overflow: hidden;}

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 15 years 22 weeks ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

&lt;div&gt; not wrapping correctly.

Ah, thank you Gary!
All fixed.

randomguy132
randomguy132's picture
Offline
Enthusiast
NYC
Last seen: 15 years 22 weeks ago
NYC
Timezone: GMT-5
Joined: 2005-03-02
Posts: 69
Points: 0

&lt;div&gt; not wrapping correctly.

While we're on the topic though, can you take look at the <div class="recent"> part of index.html?

In FF it shows up correctly, but in IE it isn't flowing right, this I just can't see any reason for.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 38 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

&lt;div&gt; not wrapping correctly.

I'm not sure what you wan, but I would do this;

/* recent changes outer box */
.recent {
    text-align: left;
  position: relative;
  border: 1px solid black;
    margin: 5px 215px 25px 52px;
    padding: 2px;
  font-size: .9em;
  background-color: #DDDDDD;
   }

/* sections within recent updates */
.p-recent {
  margin: 1em 1% 0;
   }

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.