why is my first <p> broken up into 2 column"? why is it not seeing my p:first-child rule?
http://fixmysite.us/salon_deville/about.php
| SitePoint Sponsor |





why is my first <p> broken up into 2 column"? why is it not seeing my p:first-child rule?
http://fixmysite.us/salon_deville/about.php
"Oh, and Jenkins--apparently your mother died this morning."


The first <p> isn't the "first child" of the #main div, because there are two children before it—a heading and an image. You may just have to give it a special class, or wrap an inner div around the <p>s so that the first one will actually be the first child of that inner div.
Good call ralph
Since the multi-column module is only supported in Gecko & Webkit at the moment you may as well go ahead and use CSS3 to target that first <p>
What you are looking for is :first-of-type
I would also wrap that html image in a floated block container (<p> or <div>) with a right margin on it.Code:#main p:first-of-type { -moz-column-count: 1; margin: 15px 50px; text-indent: 3em; }
Ray H.- css-lab.com
W3C Specs - CSS 2.1 | CSS current work | Properties Index





k, thanks
"Oh, and Jenkins--apparently your mother died this morning."
In regards to that <img>, it has been known to cause problems running inline elements adjacent to blocks.
I'd wrap it in a <div> in this case so it wouldn't conflict with your p:first-of-type
k,welcome
Ray H.- css-lab.com
W3C Specs - CSS 2.1 | CSS current work | Properties Index





made those changes, but am having trouble wrapping the text around the image (do I just style the image to display: inline or how should it be done?\
Thanksss
"Oh, and Jenkins--apparently your mother died this morning."


It looks like column-count prevents a <p> from wrapping normally, instead holding it to a column layout. A simple way I can see around this is to get rid of the div around the image and place the image inside the first <p>, like so:
Of course, in the real world I wouldn't use an inline style like that.Code:<p><img style="float:left" alt="Welcome" src="images/staff.jpg"> Pellentesque habitant morbi tristique ... </p>
I agree, it looks like it creates a new block formatting context. It behaves similar to an overflow:hidden element next to a float.It looks like column-count prevents a <p> from wrapping normally, instead holding it to a column layout.
I believe I would just do away with the multi-column layout altogether on that first <p> if you don't want the columns and you want the text to warp under the float.
You can kill the multi-column with the auto value and then the text will wrap
Code:#main p:first-of-type { -moz-column-count: auto; margin: 15px 50px; text-indent: 3em; }
Ray H.- css-lab.com
W3C Specs - CSS 2.1 | CSS current work | Properties Index





man. you guys r fast
"Oh, and Jenkins--apparently your mother died this morning."




www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge




www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge


Bookmarks