Old 08-03-2006, 21:35   #1 (permalink)
wolverinejoe80
Senior Member
 
wolverinejoe80's Avatar
 
Join Date: Jan 2006
Location: chicago
Posts: 341
css help. please!

i'm trying to make a white border like this. long never ending white strip.


in firefox, there is a gap on the left side of the page


in explorer, there is a gap on both sides



how do i fix this? i want the white border to stay always in the middle with no gaps regardless of the screensize.

here is my code

.pageborder {
background-color:#FFF;
width:100%;
height:520px;
position:absolute;
top: 104px;
bottom: 104px;
}


what am i doing wrong? and why explorer and firefox look different even though it's a same code?

please help me

thanks
joe
  Reply With Quote
Old 08-03-2006, 21:42   #2 (permalink)
wolverinejoe80
Senior Member
 
wolverinejoe80's Avatar
 
Join Date: Jan 2006
Location: chicago
Posts: 341
.pageborder {
background-color:#FFF;
width:100%;
height:520px;
position:absolute;
top: 105px;
bottom: 104px;
left: -1px;

and when i did this, it looks fine in firefox, but in explorer there is a gap on right side.
  Reply With Quote
Old 08-03-2006, 22:06   #3 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,118
*{
padding:0px;
margin:0px;
}

FF and IE revert to default if no padding or margin defined. (in different ways!)
Code above clears all, you then have blank canvas.
If it works thank gray.
  Reply With Quote
Old 09-03-2006, 11:09   #4 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
What are you doing right?

Setting top and bottom on absolute positioning, will just ignore the first.
Div's (and block elements in general) are automatically 100% width.
No real need for the div, you can set those margins on the body/html.
  Reply With Quote
Old 09-03-2006, 14:25   #5 (permalink)
wolverinejoe80
Senior Member
 
wolverinejoe80's Avatar
 
Join Date: Jan 2006
Location: chicago
Posts: 341
great! thanks!!
  Reply With Quote
Old 09-03-2006, 23:04   #6 (permalink)
wolverinejoe80
Senior Member
 
wolverinejoe80's Avatar
 
Join Date: Jan 2006
Location: chicago
Posts: 341
ok guys, i'm dumb and i can't figure it out.

can somebody write me the code? please?
  Reply With Quote
Old 10-03-2006, 05:04   #7 (permalink)
Dusteh
Sir digby chicken caesar
 
Dusteh's Avatar
 
Join Date: Sep 2004
Posts: 5,294
body {
padding:0px;
margin:0px;
}
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8