Top tip: when you are going out with a man, see how his siblings' children sleep.
If they are 7-7ers, there's a chance your children will get their genes.
Hope this helps, worked for me 
Sorry, don't mean to be flippant, but I do think luck has an awful lot to do with it.
My two (sorry, they sort of blur together, so not that accurate) started doing 11pm-7am around 8 weeks or so for each of them. Maybe DD2 took a little longer but it was definitely when we were counting her age in weeks.
Then when they were comfortably on solids and I thought I could drop the 11pm feed (I used to feed them before I went to bed) I would stop offering it. With DD2 (a much, much better eater than fusspot DD1) I think this happened around 7 months. With DD2 maybe 8 months or so, possibly 9?
DD1 had a massive sleep regression/unwell/teething nightmare time around 9 months and woke multiple times a night for feeds, but she went back to her old ways once it had passed.
Things that I think work:
having definite day/night times that are different - when it's "sleeping time" we don't take DDs out of their rooms, we only use dim lights etc.
bedtime routine - bath, feed, bed for DD2; bath, story, bed for DD1 create the expectation of sleep
music/light - dd1 has tapes/CDs, DD2 has a little flashing light lullaby thing she loves
I think it is reasonable to teach your children how to sleep, by giving them as many cues as possible that it is time to sleep. Ideally you should never have to do sleep "training", although I'm not saying I wouldn't if I ever have a child with MY sleep genes.
My parents are so missing out on the revenge they thought they'd have when I had children that kept me awake all night. I was a nightmare. My poor DSis, a wonderful baby who slept well and never caused anyone a second's trouble has 2 terrible sleepers and is exhausted from years of broken sleep. It really isn't fair at all.