Hey everyone,
im having problems with positioning a few divs heres my problem:
I’m trying to get the header div to spread across the screen at the top (width = 100%) and at a fixed height of 100px. I also want to get the banner div to be floated to the left of the header div and also be inside the header div and have the search div positioned to the far right and inside the header div. Finally i want the actual search bar (searchbox div) at the bottom of the header div. But no matter how i try it i cant seem to get all these to work at the same time.
Thanks that worked perfectly, i was playing around with margins before your post and had almost got it to work but this does so much better, thanks. While, we’re discussing this, i was wondering how one could, make the header div span only say a two thrds of the page and center it while also accomplishing this, because im noticing that the header spanning the entire widt of the page isnt what im looking at could i do something like set the left and right margins to auto and set a standard width on the header div like 900px?
Yep, that’s the way to go. Sometimes you might want a background color on the header section to extend across the whole screen, in which case, have an outer div width: 100% with the bg color on it and then the inner div centered like you have.