4

I want **bold** the 1st column in the CSS multi-column layout

<div style="columns:12em">Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat 
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa 
qui officia deserunt mollit anim id est laborum</div>

Is it possible?

Edit: As the question will give an answer to both my question and the posters question I thought I'll extend the question with mine...

Q: Is it possible through javascript/jquery to know at what character the column gets splited?

Breezer
  • 10,410
  • 6
  • 29
  • 50
Ryan
  • 10,041
  • 27
  • 91
  • 156
  • use the css :first-child selector to select the first element of given selector http://reference.sitepoint.com/css/pseudoclass-firstchild you can find more info there here is an example too http://tinkerbin.com/XY5QpQCA – Breezer Aug 25 '12 at 18:10
  • @Breezer: This `div` has no child elements. – BoltClock Aug 25 '12 at 18:15
  • @BoltClock yea i got it somewhere long the way that the code was about css3 columns >.< my wrong doing – Breezer Aug 25 '12 at 18:17

2 Answers2

4

Although a little short, the answer is "no" - at least, nothing in the W3C's official spec says it's possible.

João Paulo Macedo
  • 15,297
  • 4
  • 31
  • 41
  • Yu beat me to it! I just read through that as well! If this was needed though, you could use CSS regions instead, and style them, but that isn't really supported anywhere yet. – Rich Bradshaw Aug 25 '12 at 18:14
  • Heh, sorry ;) Can't wait for all these new css features to be supported. – João Paulo Macedo Aug 25 '12 at 18:20
  • Every time a new CSS module is introduced, I chortle at the thought that CSS3 will ever become a complete standard. [It just doesn't work that way anymore.](http://www.w3.org/TR/CSS/#css-levels) – BoltClock Aug 25 '12 at 18:21
  • It's a good thing really, particularly as for web designers it's meaning that there are two camps: old 'we use html4 + css2.1 because it's standardised', and new 'our sites look better, load faster and are more interactive where ever possible'. We have definitely won business based on being able to deliver better stuff! – Rich Bradshaw Aug 26 '12 at 08:39
1

Although the answer to your question is "no", the question remains why you would want to do so? Perhaps it would be enough to make bold the first paragraph of your text? This is often done in magazines etc. and could easily be achieved.

Ridcully
  • 23,362
  • 7
  • 71
  • 86