CSS - Css Help - Center Image On Page/browser Size
Hi,
Here's the site I'm working with: http://www.cjfusion.com I want to get that image centered on the browser window and then depending on how big the viewers screen is, the browser will cover up the left and the right. I hope that makes sense. I almost want it to be fluid, but I'm unsure how to do that. Ask questions if this doesnt make sense. Its hard to explain. -CJ Similar TutorialsHello, I'm using jquery and the cycle plugin to cycle through a few images on my homepage inside a container.When i load the website at any browser size, it seems to do the proper thing. The problems arise when i try to make the browser bigger or smaller after that, it does funky things to the images. If you begin to scale the browser when the first image is displayed, it also seems to scale properly for that first image, but goes haywire after that. It pretty much does it in all browsers and i can't seem to figure out if it's something im not setting properly within css or if it have something to do with jquery and the cycle plugin. here's the website thus far: www.beaucoupla.com this is my first time writing code so please any help would be appreciated! Code: @charset "utf-8"; /* CSS Document */ #mainWrapper { /* background:#000 right top no-repeat; min-width:1000px; min-height:775px; border:0px; background-color:#000; */ padding: 0 0 0 1px; margin:0; top:0; left:0; width:100%; } .mainbar { position:absolute; top:0px; left:0px; display:none; visibility:hidden; width:78%; min-height:100%; height:auto; /*This works for IE7 min-height:775px; height:775px;*/ border-right: #FFF solid medium; } #imagelist { left:0; position:absolute; display:block; visibility:visible; /* width:auto; static size */ } #imagelist img { display:block; } #imagelist img.first { display:block; } .theimage { position:absolute; left:0; width:100%; /* Adding this works for IE7 */ /* height:775px; */ border-right: solid #FFF medium; } #podcast { /*right:303px; */ position:absolute; top:0px; left:0px; height:100%; } .about_info p { font-size:1.1em; } .contact_info, .about_info, .news_info { position:relative; margin-top:4em; margin-left:10%; width:78%; font-family:Arial, Helvetica, sans-serif; font-weight:bold; font-size:1.3em; color:#FFF; height:100%; } .contact_info #title, .about_info #title, .news_info #title { font-size:1.75em; padding-bottom:1.5em; color:#1ac089; color:#03c5d1; } .contact_info .heading { color:#c04141; font-size:1.2em; } .contact_info .mail { text-decoration:underline; } .contact_info a:hover { color:blue; text-decoration:underline; } .news_info .heading { color:#c04141; } body { /*width:1400px; height:775px;*/ padding:0; margin:0; border:0; background-color:#000; } #share td { padding-left:0.5em; } #share { margin-left:1.4em; margin-top:0; border-top:0; /* padding-top:5; */ font-size:0.65em; } .sidebar { position:relative; font-family:Arial, Helvetica, sans-serif; font-weight:bold; margin-left:78%; margin-top:1em; font-size:2em; color:#FFF; } ul { border:0; margin:2px; text-decoration:none; } li { list-style:none; } a { text-decoration:none; color:#FFF; } a.home:hover { color:#bc7bd4; } a.news:hover { color:#7bd488 } a.podcast:hover { color:#d47b88; } a.blog:hover { color:#d4cb7b; } a.about:hover { color:#7bd4c6; } a.contact:hover { color:#d4a37b; } a.twitter:hover { color:#33ccff; } a.myspace:hover { color:#999; } a.facebook:hover { color:#5b61d5; } Hi, I have a front page which is one image only, no text. The image is centered horizontally (i.e. a simply text-align: center; ). My question is - how do I centre it vertically? (no matter what the resolution of the website visitor is). i.e. Currently the image is at the top of my screen. I would like it to be in the centre, both horizontally and vertically. Many thanks! So when using Netscape 7.2 & Opera 7.5 and MSIE 6.0, How do you get a simple tag like body { font-size:small; } to be equal in all browsers? Setting IE Text Size to Medium, and Opera's Zoom to 100% (both defaults) and Netscape 7.2 to 120% (not the default) is one way, but is there a CSS way? By the way, the child element hack "body>div {property}" wasn't working no matter what I tried, by not working I mean to say Netscape never would read it or apply it. It appeared to be that Opera & IE need to read the same value while Netscape needs to apply a larger size to be equal to IE's and Opera's rendering. B I am using the following code how do I change it so that it would show up in the center of the brower window? Thanks Tim PHP Code: <div style="position: absolute; left: 0px; z-index: 1; top: 0px; align: center\"> <object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0 ,0\" width=\"544\" height=\"396\" id=\"cardio\" align=\"middle\"> <param name=\"allowScriptAccess\" value=\"sameDomain\" /> <param name=\"movie\" value=\"ads/cardio3.swf\" /> <param name=\"loop\" value=\"false\" /> <param name=\"quality\" value=\"high\" /> <param name=\"wmode\" value=\"transparent\" /> <param name=\"bgcolor\" value=\"#ffffff\" /> <embed src=\"ads/cardio3.swf\" loop=\"false\" quality=\"high\" wmode=\"transparent\" bgcolor=\"#ffffff\" width=\"544\" height=\"396\" name=\"cardio\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /> </object> </div> Hello, I have my XHTML code in CSS to insert an image at the top like this: Code: <div id="award"> <img src="images/award.gif" alt="Year Award" /> </div> #award { position: absolute; top: 30px; left: 400px; z-index: 99; } When I resize my browser this image just changes its position and moves across the page. And all my content is set to auto margin on left and right. How do I make it fix into a position and wont change during resizing or the browser? Hello, I've created a wrapper div for my main content and I center it on the page by setting margin left and right to auto. I add some content to it but the height of the wrapper never grows larger than the content. How can I make it so the background color of the wrapper, for example, goes to the bottom of the browser regardless of the amount of content inside of it? Thanks in advance. hello guys,, I was wondering how to make a webpage take the full browser size and not over flow or be smaller than the browser window also atleast 800 x 600 thnx for ur time.. HMV In my web docs, in FF, the text size can be adjusted in the browser, but not in IE. Why would this be? I'm using points to define font size by the way. So I've got a page on which a menu exists (or will) that is a certain width, I believe 854px. Now I know that this isn't the best idea, but I'm following someone's specific orders so meh. Now, my problem is that I want the page to resize according to the browser size and fill the page, so if the browser size is 1054 then I want the background image at the top to run the entire width of the page, and the menu, I'd want to center. Now if the browser is 854px or wider, then the page looks fine, but when the browser is anything less, then the menu, because it is a specific width, expands as it should as well as centers itself forcing a horizontal scroll bar, but the rest of the page is acting like it is ONLY 854px and therefore it cuts off and is now no longer centered with the menu. It must be possible to do, right? Here's a link to the page I'm using for debugging purposes http://www.agentjeff.com/headerv10.html I am having few html pages with external CSS used. Now when i want to change the brower text using View->Text size, its not allowing. Yes, i can change the font size in my CSS but I dont want all should see in the same font. Few people viewing those pages may not like that font. So, Can any body help me to find out how to change the text size of an html page having CSS. Hi I am trying to learn how to design and develop a website that has consistent behavior across browsers, browser window size and screen resolution. What are the industry best practices for designing and developing such websites. Your help is appreciated Thanks I have a div sitting on a html page that will be included in the main page. I include this page into a table and I would like the div to be centered horizontally inside the table cell. It isn't working for me at the moment. Am I doing something wrong? Here is what I have so far: Code: #mybox{ border-style: solid; border-width: 1px; border-color: #000000; padding: 5px; width: 400px; left-margin:auto; right-margin:auto; } Brad. I am trying to center this entire page, and it does show up centered in IE; however, after checking with BrowserShots.org, in all browsers other than IE, the header image is centered, but the rest is aligned on the left side....??!! Here is the page: http://www.georgiaspinal.com/indexTESTBR2.html Here is the CSS file I am using: Code: body {margin:25px; font:12px Verdana, Arial, Helvetica; } * {padding:0; margin:0} #wrapper { text-align: center; width: 770px; margin-left: auto; margin-right: auto; } .hidden { display: none; } .unhidden { display: block; } <div id="article" class="hidden"> Thanks for any help here!!! I have a single column layout with a fixed width (say, 700 px), centered in the window, composed of header, body, and footer divs in a wrapper div. I would like background images, left and right of the center column (two images, because they sort of fade up to the edge of the centerd div). How is this done? Is there a way to center the entire page using CSS? Reidy I know there has to be an easy answer to this question but I'm at a loss! How do I center an image using CSS? Thanks! BB |