HTML - Center Website.
Hi there guys.
I think for the most of you, an easy question: How do I center my whole webpage? (offcourse except for the background, because it is allready filling the whole screen.) This is my source: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>V</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="fusiox" /> <meta name="description" content="forum" /> <meta name="keywords" content="v" /> <style type="text/css"> body { background-image: url(img/1168.png); background-repeat: repeat font-size: 12px; color:#ffffff; font-family: "Comic Sans MS", cursive; font-size: 12px; font-style: normal; font-weight: normal; font-variant: normal; } #inhoud { text-align: left; vertical-align: middle; margin: 20px auto; padding: 0px 0 0 0; width: 1024px; background-color: #000000; border: 2px solid #ffffff; position: absolute; font-family: "Comic Sans MS", cursive; font-size: 10px; font-weight: bold; color: #3C3; } img { padding: 0; margin: 0; font-family: "Comic Sans MS", cursive; font-size: 10px; color: #3C3; } p { padding: 0; margin: 0; } a { color: #ffffff; display: underline; } a:hover { color: green; } body,td,th { color: #000; font-family: "Comic Sans MS", cursive; font-size: 12px; font-weight: bold; } #apDiv1 { position:absolute; width:386px; height:427px; z-index:1; left: 32px; top: 197px; font-family: "Comic Sans MS", cursive; font-size: 10px; color: #3C3; font-weight: bold; } #apDiv2 { position:absolute; width:413px; height:405px; z-index:2; left: 555px; top: 334px; font-family: "Comic Sans MS", cursive; font-size: 12px; font-weight: bold; color: #3C3; } #apDiv3 { position:absolute; width:200px; height:115px; z-index:2; left: 72px; top: 412px; } </style> </head> </head> <body> sorry, I know, i am kind of a noob in the html world. Tnx, in advance! Similar TutorialsMy website looks expanded and centered if you look in a 17" or 22" monitor. How can I get them centered in these monitors. <div id="masthead" style="width: 989px; height: 113px"> Pl help. Thanks Hello, I am very new to website design and I need help centering this page: http://tommygonline.com/news.html It looks centered at my screen resolution, but it is not centered on other resolutions, is their a universal code to center on all screens? Any help would be greatful C. I think I am missing something or am an idiot. I have a website that is too wide for some screens (I know its wide... I'm doing it for a specific reason, I promise). When its opened on screens that are not as wide of a resolution, it opens all the way to the left and you have to scroll over to center it. I am hoping someone can tell me the code to center it. Any ideas? http://www.faithfamilychurch.com/youth/index.html I've copied some html code which gives the time & date on my own website. The problem is, I can't seem to center it so it looks good on my homepage. Can anyone provide me with the code to center it? Here's the code I'm using: <iframe src="http://free.timeanddate.com/clock/i172f04w/n136/fs15/fc990/ftb/tt0/th2/ts1" frameborder="0" width="313" height="20"></iframe> hello, i need a website for german customers, somethign like www.podmod.de because i would like to offer the same. So if anyone has an idea where to start, or even can offer me something i can buy, please do so. my email: verenamueller999@web.de thanks verena. Hi How to add a website counter to my website. So that when ever a visitor visits the website I want the counter to increase say from 101 to 102 and then for a new visitor it should be 103 and then again for the next visitor 104 and so on..... I want to know the code. There are number of websites that are offering this but they put their advertisement which I don't want I have some links (in the header, the SUPPORTERS) to different websites, but when I click on them the address in the address bar does not change to the address of the website that I clicked. How do I make it show the address that I clicked on? Thanks. http://www.ac.wwu.edu/~fencing/ I am a total noob but volunteered to administrate the website, because there was no one else to do it. Hi, I am trying to find a way in which a website that is linked on my homepage can be opened while keeping at least one form of my homepage open as well. e.g.: Google images :http://images.google.com/imgres?imgu...en-us%26sa%3DG sorry for the massive link. Hope you get the idea. So what i want is to have a bar on top that is my homepage (like the google bar in the link), but the rest is the actual website that has been linked. I don't really care much about the url. It doesn't have to be my homepage url, it can be the actual website url. Google has been able to do that somehow, so it is possible. I would just like to know how and if it is hard to do. If someone knows how to do it, it would be great if you could give me a link to a tutorial, or explain it. thanks http://www.ivoog.com/test/help The boxes that have: Paypal, Policies, Financing, Wholesale, etc. How can these be centered in all browsers including IE6? I can't get it to work Here's the CSS: #othermain2 { width:850px; height:850px; float:left; } #middlestyle { width:850px; text-align:center; margin:auto; overflow:auto; } .middlebox { width:150px; text-align:center; float:left; font-size:24px; margin-left:50px; margin-top:50px; border:solid 5px #333; } .middlebox:hover { width:150px; text-align:center; float:left; font-size:24px; margin-left:50px; margin-top:50px; border:solid 5px #390; } FULL CSS: http://www.pics.ivoog.com/page/home.css Can anyone help me? Thanks. I have a webpage with a header, column on each side, footer and a mainContainer in the middle. I would like to set up links on the left column that, when clicked, open a new 'page' in the center (mainContainer). I am using all div tags, no tables. Could someone point me in the right direction? TIA Quick question. When using a generator to make a website, it seems that usually everything is placed into "DIV - ABSOLUTE" codes. How do I center everything up so it isn't all stuck to one side for users who have a higher resolution? I am learning how to use Div's to replace Tables for layout. Needless to say, there are many properties I need to learn with CSS's. A friend wants a Floating area on the left which I have created, however I would like to have the box be centered in the main text area. Not sure if that can be done with my prototype at http://www.toddcary.com/viewpoint/div_todd_a.html Any help would be appreciated... Todd I have several div tags that I want exactly where I place them regardless of a user's screen size / resolution ... if I place them right of left 200 px then they shfit depending on resolution ... samve if I place them right of left by, say 85%. I'm figuring if I place the div tage left of center or right of center then they will always position correctly because the center doesn't vary according to resolution. How do I do this? I tried document.getElementById("divid").style.center = "25"; (i was attempting 25 pixels right of center) but it doesn't work. Any suggestions? Thanks! <tr> <td class="contentarea_b"></td> </tr> <h3>=WFC= WAR FORCE CLAN AMERICAS ARMY</h3> <table cellpadding="0" cellspacing="0" border="0"><tr><td><object type="application/x-shockwave-flash" data="http://video.google.com/googleplayer.swf?docId=4279961105245592436&hl=en" height="350" width="425" style="width:400px; height:326px;" id="VideoPlayback"> <param name="movie" value="http://video.google.com/googleplayer.swf?docId=4279961105245592436&hl=en" /> <param name="allownetworking" value="internal" /> <param name="allowScriptAccess" value="ALWAYS" /> <param name="enableJSURL" value="TRUE" /> <param name="enableHREF" value="TRUE" /> <param name="saveEmbedTags" value="true" /> <param name="flashvars" value="" /> </object></td></tr><tr><td> </table> </td> Hey felllas. I really need some help here. I'm building this page, but can't get it to center. I bet it's somethign dumb I'm overlooking. could you please take a quick look at the source and LMK what I'm missing... http://bravoad.com/BravoTest2.html Thanks in advanced I Can't center my whole nav bar in the middle of the sidebar 1 div. Here is the link for the website. http://northwindappaloosas.com/NewHome.html I am administering this forum www.br-eeze.com So please enter there as the flashing banner and the weather widgets. Both are positioned on the left. Now this is the code for the banner: <td align="center" valign="top" width="90" height="55"><A target = "_blank" HREF="http://www.br-eeze.com"><IMG SRC="http://www.xxx.com/test1.gif" border=0 width=728 height=90 ></a> As you can see I tried to center it. I even typed right but still everything is aligned to the left. PLEASE, how do I center the banner and the weather widgets? Hey im new at this html programming and im ok at it but i still need to learn more i need help centering the stuff on my page you will see what i mean if you go to my website. firefoxskins.awardspace.com. I would really like help thank you for your time. hi, i'm currently creating a website and the first page is basically one image and the links are all hotspots. i'm basically image mapping. i'm trying to center the image but i can't make it center in the absolute middle of the page, with the same space between horizontal and vertical sides. when i center it the image just centers horizontally but its near the top. i tried vspace but that makes it look different depending upon browser/computer. right now i have <div align=center> and that only centers it horizontally and not vertically. how do i center it vertically too? thanks, hope it wasn't too confusing. Dear readers, I am working on the Schools web page and I require some help. I have created a 'navagational menu bar' and i am having trouble aligning it in the center of the page no matter what the resolution of the screen is. Here is the coding: Code: <DIV ID="MainMenu"> <div id="MenuMain"> <!--Main Buttons --> <div id="menu"> <a href="general/psmenu.htm" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuShowMenu('MenuContainer_0', 'Menu_0',0,28,'ParentsStudents');"><img src="images/schoolmenu.png" alt="Festus School" border="0" /></a><a href="general/employeemenu.htm" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuShowMenu('MenuContainer_1', 'Menu_1',0,28,'Employees');"><img src="images/aboutmenu.png" alt="About FHS" border="0" /></a><a href="schools/index.htm" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuShowMenu('MenuContainer_2', 'Menu_2',0,28,'Schools');"><img src="images/psmenu.png" alt="Parents & Students" border="0" /></a><a href="depts/index.htm" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuShowMenu('MenuContainer_3', 'Menu_3',0,28,'Departments');"><img src="images/facultymenu.png" alt="Faculty" border="0" /></a><a href="publications/index.htm" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuShowMenu('MenuContainer_4', 'Menu_4',0,28,'Publications');"><img src="images/curricularmenu.png" alt="Extra-Curricular" border="0" /></a><a href="board/index.htm" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuShowMenu('MenuContainer_5', 'Menu_5',0,28,'Board');"><img src="images/newsmenu.png" alt="News" border="0" /></a> </div> Here is the CSS: Code: #MenuMain { /* The master div to make sure that our popup menus get aligned correctly. Be careful when playing with this one. */ position:relative; margin:0px; text-align:left; width: 100%; } #MenuContainer_0 { /* This ID is related to the master menu div for menu MenuContainer_0 and contains the important positioning information for the menu as a whole */ position:absolute; left:500px; top:45px; z-index:300; visibility: visible; } #Menu_0 { /* This class defines things about menu Menu_0's div. */ position:absolute; left:0px; top:0px; visibility:hidden; background-color:#FFCC33; border:1px solid #FFCC33; width:158px; height:111px; } One mo Code: BODY { BACKGROUND:#FFCC33; COLOR:#000000; FONT-FAMILY:SANS-SERIF FONT-STYLE:Arial; FONT-SIZE:12; } A:LINK { COLOR:#EB3914; text-decoration:NONE; } A:VISITED { COLOR:#EB3914; text-decoration:ITALICIZED; } A:HOVER { COLOR:#000000; text-decoration:underlined; } A:ACTIVE { COLOR:#000000; } .BORDER { BORDER:1PX SOLID BLACK; BACKGROUND:#FFBB33; COLOR:#000000; } .YELLOW { BACKGROUND:#FFCC33; } .MainMenu { margin:auto; width:800px; } ANY help in this matter would be most appreciated. P.S. There was more coding but I got yelled at saying it was too long. Sincerely, -gamesfreke |