Can someone please make me a css code looks like this image attached. Description on the picture. Black bg Box size 700px and height is 500px - Hide Scrollbar - The box must be middle of the screen, equal top height, bottom height, left and right. - Background color - #000000 - box color - #333333 - Thin border color - #999999
Anything I dond mind as long as the scroll bar is locked, and the box is middle of the window with any monitor size. Thank you
Hi Manishk Thanks for your link, it looks good , but when i add a flash movie inside the box the movie come outside when i make the screen smaller. ?? maybe with a table disabling scrollbar, I know there is a javascript thing that can do to the table,, but cant find it
If you have a link then I can have a look at it. Achieving the same effect with tables: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style> html,body{height:100%;padding:0;margin:0} #container{width:100%;height:100%} #inner{background:red;height:300px;width:50%;margin:auto;} </style> </head> <body> <table id="container"> <tr> <td><table id="inner"> <tr> <td> </td> </tr> </table></td> </tr> </table> </body> </html> Code (markup):
Manishk I think thats what i m looking for, I think this will fine i will use the table then, Thank you very much for your time. Ah I have made one with div tag, but something wrong,, view this with both browsers, ie and Firefox. http://www.hfolder.com/div_center/center.htm
Manishk I think the one you sent me with table is great !! I m going to use that, Thank you for your time. Just one more question , Which is best to use with all browsers, is it Table or using table with div??
hi nals, tables are originally meant for well, tabular data, so for layout purposes i think its better to avoid tables as much as possible, table-less designs are much more flexible,customizable, and loads faster (although the learning curve is a bit harder)
I prefer div for layout. It takes a while to get a hang of it but its really worth the effort... and as serialCoder said table is indeed meant for displaying tabular data and not for layout. Having said that, you can use tables until you are comfortable with div.