Click to See Complete Forum and Search --> : A webmasters lament
Not to mention
09-18-2009, 05:17 PM
I have two divs here:
http://www.blitzkrieggaming.com/~ultra/
and i need them to align with each other. I suspect the margins, so if you can help me find a different means of aligning them, please share the information.
Freejack
09-18-2009, 08:19 PM
I don't claim to be an expert, but in the index.css .leftbar style, change to
margin-top: -520px;
The problem of course is that the bottom of the box is tied to the bottom of the .leftbar being the shorter box. If you swap the div's leftbar and rightbar in the index.html file, you'll need to change the .rightbar index.css entry and it'll work out better:
margin-top: -250px;
Of course that assumes both bars stay the same so it may not be the right solution if you have dynamic content.
Also, you have an extra closing div tag (you might use indents to easily find these :) ).
Hope that helps. (Looks nice though :) ).
Carl
Freejack
09-18-2009, 08:32 PM
Hey, the float keyword seems to work pretty well but you lose the big box behind it.
float: left;
In both .leftbar and .rightbar and in .rightbar, change
margin-left: 50px;
Carl
Not to mention
09-18-2009, 10:49 PM
Thanks! and i'm glad you like the site, i worked hard on it(i'm getting paid with free hosting!:))
And i used the float, and it was apparently fixed when i set the .main to
max-height:200%;
overflow:auto;
Again, thanks for the input, worked like a charm!
Freejack
09-18-2009, 11:42 PM
Excellent. I was still poking around and hadn't tried that yet. Glad it helped though.
Carl
opifex
09-18-2009, 11:52 PM
IE reads float differently in each version.... you might have to hack the css to get it to look right cross-browser (sadly).
conrad4784
09-19-2009, 04:36 PM
hello I have posted a thread earlier but no luck yet i saw your thread and you might be able to answer. Is the big box in the middle of the screen a div that contains the other two div's? I am just curious how you got the content centered in the middle of the page. I'm having no luck with it. any help would be greatly appreciated. thank you
Freejack
09-19-2009, 05:10 PM
From looking at the code, it's one big div with the two smaller boxes as divs in the wrapping div
div
-div
-/div
-div
-/div
/div
The css has the margins but the box seems to adjust to 50px of the bottom of the second div. So if the first one is longer, it falls outside the box.
You should be able to retrieve the page, the graphics and the .css file (I did) and play with it to understand what he's doing. It doesn't look that complicated (I mean, if I can figure it out :) ).
Carl