March 29, 200917 yr MyVee.co.uk seems to be centred on most peoples computers however, I would like the code for it to be centered as in, for it to be fixed. So whtever size the persons browser is set at, or resolution of there monitor, it all stays in the center. This is my code (I had problems layering it out... all i did was put a div layer inside a div layer... which caused lots of problems I'm not too sure how it can be fixed) /* CSS Document */ Layer1 { border: 2px solid #000000; } #Layer1 { border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; } #Layer1 { position:absolute; width:800px; height:41px; z-index:1; left: 225px; top: 0px; background-color: #FFFFFF; background-image: url(images/Banner.JPG); } #Layer2 { position:absolute; width:800px; height:335px; z-index:2; left: 224px; top: 52px; } #Layer3 { position:absolute; width:429px; height:115px; z-index:3; left: 236px; top: 64px; } #Layer4 { position:absolute; width:129px; height:19px; z-index:4; left: 896px; top: 23px; } #Layer5 { position:absolute; width:326px; height:184px; z-index:1; left: 458px; top: 11px; } #Layer6 { position:absolute; width:126px; height:14px; z-index:2; left: 575px; top: 7px; } .style1 {font-size: 18px} body {font:normal 0.7em auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;color:#567475;line-height:1.1} body a {font-weight:bold;text-decoration:none;color:#567475;} .input {border: 1px solid #99b3b4;width: 220px;background: #e4ebeb url(../images/input_stripe.gif);font: 11px verdana, sans-serif;color:#443;padding:3px;outline:none;} .input:focus {border:1px solid #567475;background: #e4ebeb;} .submit-btn {width: 54px;height: 20px;background:url(../images/submit.gif) no-repeat;outline: none;vertical-align:top;border:0;margin:5px 0 0 0;float:center} .submit-btn {margin:1px 0 0 0;#} .submit-btn:hover {background: url(../images/submit.gif) no-repeat 0 -20px;} .clear {clear:both} #log {auto auto auto;} #log p {margin:0;padding:4px 0 4px 0;} .error {color:red;margin:0;padding:0;} .msg {color:green;margin:0;padding:0;}
March 29, 200917 yr You shouldn't be positioning everything absolutely, it's just gonna cause problems. To center it, either work your code logically so that it's flowing in the document, or as a quick fix try adding [[Removed, won't work]]
March 29, 200917 yr Author You shouldn't be positioning everything absolutely, it's just gonna cause problems. To center it, either work your code logically so that it's flowing in the document, or as a quick fix try adding [[Removed, won't work]] I don't quite understand what you mean. Also, the main thing I could most probably do, is how could I put all the divs fixed inside one div. So that if I move the one div, everything moves with it.
March 29, 200917 yr Remove the position: attribute, and the top,left,right,bottom values. Re-structure the html semantically (i.e how you'd read the page, left to right, top to bottom). Then you should just need to apply spacings between elements accordingly.
March 29, 200917 yr Author Remove the position: attribute, and the top,left,right,bottom values. Re-structure the html semantically (i.e how you'd read the page, left to right, top to bottom). Then you should just need to apply spacings between elements accordingly. Thank you, it seems to be alot better now. I noticed your signature, my real name is Jean-Luc. I don't like it though, changing it to jeanie when I turn 16 in june.
March 29, 200917 yr lol Jean-Luc Godard is one of the greatest directors ever! It's a good name, you should keep it Sorry if my replies are a bit short and vague, but i'm a bit busy this morning (yet still on here? no wonder my productions gone down hill in the last two months :/). Any problems or help, pm or post and someone will get round to it, if not i will (eventually).
Create an account or sign in to comment