I want to center (horizontally) a div using margin:auto but also make the background expand "infinitely" to the right, without affecting the page width and scrollbars.
Right now I use margin:auto but it depends on a fixed width, say 1000px, which crops the background to 1000. When the browser window is larger than 1000 the background ends and there's a white space. I'm using a 1500px background but if I set the div width to 1500, the browser adds a scrollbar and thinks the page and content is 1500px wide, even though I just want it to be 1000.
Please see the sandbox: http://18.104.22.168.
You'll notice 4 "boxes" (all
UNTIL one re-sizes the browser smaller, dragging the lower right corner of the browser to the left. As you can see, the farthest right "box" drops down below the one to the left of it. And so on and so forth as you keep resizing the browser downward.
I created a simple dropdown menu with CSS and it is working well in Firefox, but of course there are some problems when I'm using Internet Explorer 7:
1) Both dropdown-topics (Site3a, Site3b) are shifted to the next menu-point (Site4), instead of beeing shown right under Site3.
2) In front of both dropdown-topics there are those listing points in the IE 7.
3) Both dropdown-topics (Site3a,Site3b) dont have the same width. Again, only in the IE7.
Heres the code:
I have made a website newthinking
I have placed the titles on all pages beneath the header because I have not been able to place them INSIDE the header.
How to do that? What is the best course of action?
1. To work with images?
2. To position absolutely. And if so, is this page: http://www.joe2torials.com/view_tutorial.php?view=37 a good example of that?
3. By working with float. To position the titles next to the image that is in each header?