View Full Version : basic - masthead div with 2 columns css - how?

03-08-2005, 11:58 PM
i've got a masthead div that i've created:

position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 70px;
background-color: #000000;


in my html, i spec the masthead div and have a set of 3 graphics inside it that start from the left of the masthead. i have another graphic that i want to be aligned at the right side of the masthead. (the overall effect is like a two column table, where the contents of the left side cell are left aligned, the righ side cell are right aligned.

what is the simplest way to achieve this?

i've tried using float and some other ideas, but these commands, while making the graphic right-aligned, drop it below, outside the masthead.

thanks for the help.

Mr J
03-09-2005, 03:32 PM
Do you mean something like this

<div style="width:590px;border:1px solid black">
<div style="font-weight: bold; float: left; width: 270px;height:30px;color: #404000; text-align:left; padding:10px"><img src="pic.jpg"><BR>
<div style="font-weight: bold; float: right; width: 270px;height:30px;color: #606000; text-align: right; padding:10px"><img src="pic.jpg"><BR>

03-09-2005, 03:37 PM
How do you expect anyone to give a definitive answer without the necessary information? We need the markup, the styles used, and preferably a look at the images used; a link to the page online would be best (since you cover all three with that).

03-11-2005, 02:34 PM
MJ -- Thanks a lot!! i was able to stuff that code in and tweak it to fit.

i didn't work out having to have two specific div styles with fixed widths. i think that was the secret. cheers for the help!

Mr J
03-11-2005, 03:39 PM
Someone may still pop in with a better way of doing it but if it is sufficient for what you are wanting alls good :)