Hi James. >On 1/5/07, james shannon <[EMAIL PROTECTED]> wrote: > > >Hi all -- > > After following this list for the past several weeks, I've been > >redesigning my current project with a few Good Ideas. One of which is > >making everything more semantic. > > I had previously been doing this: > > > ><div class="section_box"> > > <div class="title">Welcome to my site</div> > > > > Lorem ipsum dolorem..... > ></div> > > > >div.title would be styled with a different color, a border-bottom, > >larger text, etc. In the name of semantics, I replaced <div > >class="title"> with <h1> and styled h1 appropriately. It looked > >great, and I felt good, but ran into problems with: > > > ><div class="section_box"> > > <h1> > > <div float: left>Welcome to my site</div> > > <div float: right; smaller-font>Click here to expand</div> > > </h1> > > > > Lorem ipsum... > ></div> > > > >It worked fine, but didn't validate. Turns out the spec doesn't like > ><div>s in <h1>s. > > > >Is there a way around this, or should I just go back to div.title? I > >thought about > > > ><h1 class="left">text</h1><h1 class="right">link</h1> > > > >but there are some problems with that and getting everything to line up. > > > >thanks in advance, > >james >
You can not put block elements in h1. There is a simple solution to your problem. Your code: <h1>Welcome to my site <span class="right">Click here to expandtext</span></h1> and your css: h1 span { float: right} I think that your second text ("Click here to expandtext") would have to be out of the head level 1. Are you sure that, in a semantic way, it is part of the h1? www.niquelao.net - Niquelando la web ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/