Lisa Frost wrote: > Hi Peter, > Thanks, floating left and changing some padding and margins have now > produced the desired effect. > I used an image just because its not a standard font. All the other fonts on > the site are quite bland and the bog standard ones you find on most peoples > computers. Haven't finished doing all the missing alt tags yet. I really > don't want to use verdana or Geneva for the header as well. > > So next question: > If i need to align two elements then the way to do it is to float one of > them? > Is there a css equivalent to for example align="absmiddle" in HTML? > > Thanks > > Lisa > > > I'm not the most expert person on this list by a long chalk, Lisa, but my experience is that there are always about half a dozen ways to do things. For example, in this situation you could have floated both elements left, or you could have floated the menu to the right. On the other hand you could have made them display inline, I suppose! You could even have used the CSS2.1 table-like display values, or even set the display to inline-block:
http://www.w3schools.com/css/pr_class_display.asp Or you could use CSS positioning... (See what I mean? It's endless) A lot of it depends on the decisions you make in the structure of your HTML. For instance here, you'd decided to make your menu an unordered list (IIRC), which is another block element, so in the natural flow of things it's going to come below the block element immediately preceding it in the HTML - which was an image in this instance. On other occasions, you might not be dealing with two block elements - in which case the problem would be solved differently. I guess that most people have their own pet ways of doing things like this. Using a float like this just happens to be mine. The most important thing is to make sure you can envisage what's happening, I think. This means being thoroughly familiar with the CSS box model. Once you can envisage that, you'll understand what's happening and be able to think of ways of tackling it. And there are tools. I take it that you develop in Firefox (if not, why not?). Assuming that to be the case, you are spoilt for choice. The Web Developer toolbar comes with element outlining facilities, which can be invaluable. Then there is Firebug. The best thing about Firebug, for me, is the fact that it allows you to right-click on any element and select "Inspect element". You can then see all the style rules that apply and how they are affecting the layout on your page. HTH Cheers Peter ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/