Notices
The Basement Non-Honda/Acura discussion. Content should be tasteful and "primetime" safe.

HTML/CSS crew v.Help

Old Jun 23, 2009 | 11:13 PM
  #1  
M@rshy's Avatar
M@rshy
Thread Starter
٩(̾●̮̮̃̾•̃̾)۶
 
Joined: Aug 2004
Posts: 21,807
Likes: 0
Default HTML/CSS crew v.Help

Okay crew, I can't figure out the best way to do this.
Here is my site:


I want div1 to stay on the left hand side. That is working well.
I want div2 to be centered. (So I have #div2 {margin:0 auto;} 0 meaning all the way at the top, auto meaning it centers it from left to right.)
What goes wrong is when I resize my window(Or view it at a lower resolution), div2 goes behind div1.
How can I fix this so div2 stays centered, but never collides with div1(Meaning left margin is greater than 165(Width of div1))?
What it should be is auto>165. I don't want to set it at 165 because then it looks lopsided for everyone who has larger or widescreens

<body>
<div id="div1">
</div>
<div id="div2">
</div>
</body>

I have tried putting div1 inside div2, but it still does that.
Attached Images
File Type: png
untitled.PNG (8.7 KB, 28 views)
Reply
Old Jun 24, 2009 | 02:29 AM
  #2  
k3ifers's Avatar
k3ifers
k three ifers
 
Joined: Jun 2002
Posts: 42,568
Likes: 4
From: Buffalo, NY
Default

http://www.fandangoseason.com
http://www.fandangoseason.com/style.css

you can steal my code
Reply
Old Jun 24, 2009 | 04:17 PM
  #3  
M@rshy's Avatar
M@rshy
Thread Starter
٩(̾●̮̮̃̾•̃̾)۶
 
Joined: Aug 2004
Posts: 21,807
Likes: 0
Default

Thanks, I may just do it like that.
I want to keep div2 at a set width.
I suppose I could do it the cheap way and have a filler image to the left of the centered logo.
Reply
Old Jun 25, 2009 | 04:50 AM
  #4  
k3ifers's Avatar
k3ifers
k three ifers
 
Joined: Jun 2002
Posts: 42,568
Likes: 4
From: Buffalo, NY
Default

you want div2 to stay the same size? or resize as you change the size of the page?

while div1 always stays the same size?
Reply
Old Jun 25, 2009 | 09:49 AM
  #5  
M@rshy's Avatar
M@rshy
Thread Starter
٩(̾●̮̮̃̾•̃̾)۶
 
Joined: Aug 2004
Posts: 21,807
Likes: 0
Default

I dunno. Really right now I just want it not to overlap when the screen is resized or a small resolution. I suppose it would be okay if I let div2 resize.
If I set the width of div1 to be 20% and div2 to be 80%, then div1 would get bigger than I want it sometimes.

I really don't want to do tables either, even though it would be an easy solution.
Reply
Old Jun 25, 2009 | 09:50 AM
  #6  
k3ifers's Avatar
k3ifers
k three ifers
 
Joined: Jun 2002
Posts: 42,568
Likes: 4
From: Buffalo, NY
Default

did you look at mine and resize it?
Reply
Old Jun 25, 2009 | 09:55 AM
  #7  
M@rshy's Avatar
M@rshy
Thread Starter
٩(̾●̮̮̃̾•̃̾)۶
 
Joined: Aug 2004
Posts: 21,807
Likes: 0
Default

Yes. I tried to do the same thing but determined it wouldn't work. I forgot why now. Let me take another look and play with it.
Reply



All times are GMT -8. The time now is 01:22 PM.