Old 12-06-2008, 14:58   #1 (permalink)
hyperzzzz
Registered User
 
Join Date: Mar 2008
Posts: 41
cannot think, moving with css

I am having a slow thinking process today, below is my code.

#main {
border-style: solid;
border-width: 1px;
border-color: #1d1d1d;
width: 947px;
height: 215px;
background-color: #0b0b0b;
margin-top: 10px;

}

Basically on the screen, its just large grey box. I want to center it, is there any other way apart from using the margin property. I swear there is but like I said, im having a blonde moment if you will.

cheers
  Reply With Quote
Old 12-06-2008, 15:34   #2 (permalink)
spiral
dt newbie
 
spiral's Avatar
 
Join Date: May 2008
Posts: 82
why dont you want to use margins?
margin: 10px auto 0 auto; should do the trick
  Reply With Quote
Old 12-06-2008, 15:54   #3 (permalink)
hyperzzzz
Registered User
 
Join Date: Mar 2008
Posts: 41
ha LOL! I couldnt think of using auto, oh dear. someone please shoot me. Shoot me now.
  Reply With Quote
Old 12-06-2008, 16:43   #4 (permalink)
doffy
Senior Member
 
doffy's Avatar
 
Join Date: Oct 2007
Posts: 304
that would be illegal.
__________________
-
  Reply With Quote
Old 16-06-2008, 08:01   #5 (permalink)
kudos
Registered User
 
Join Date: Jun 2008
Location: Manchester
Posts: 49
Out of interest, using:

border: 1px solid #1d1d1d;

to replace the three border selectors will cut down your chance of a repetitive strain injury.
Just short hand - you dont lose anything by using it.
  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