Jump to content

Alignment Issues


Recommended Posts

I have a website, www.myvee.co.uk On most computers and OS and browsers it all works and its centred. Though some aint centred, its shifted to the right the whole thing.

I have serious issues with getting it all in place, I end up putting div layers ontop of div layers, which isn't the answer to a clean CSS.

This is my css code, it's possible I know it is, that youcan centre the whole thing, the text shouldn't be centred  it should look like it does on the link



Except centred compeltely no matter on the machine, system and browser.

This is my css style code


/* 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 {





left: 225px;

top: 0px;

background-color: #FFFFFF;

background-image: url(images/Banner.JPG);


#Layer2 {





left: 224px;

top: 52px;


#Layer3 {





left: 236px;

top: 64px;


#Layer4 {





left: 896px;

top: 23px;


#Layer5 {





left: 458px;

top: 11px;


#Layer6 {





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;}

Link to comment
Share on other sites

Basically you need to make a <div> that will have all other elements within it, for these purposes it's called wrapper, so for example:


<div id="wrapper">

// all your other content and divs etc go here



div#wrapper {
margin-left: auto;
margin-right: auto;
width: 800px; // Whatever width you want

Link to comment
Share on other sites

I changed it, I added the top bit (banner bit) and the body as two div's, so I set them both, but they actually are the same div tag, but seperate. Which shows it alot better, though, on my mums pc, its better than it was, but its still shifted to the right. If there anything wrong with the code, or could it be a cache cookie and temporary internet file problem?

Link to comment
Share on other sites

Don't have two wrapper DIVs, open it after your body tag, and end it before your closing body tag.


You may also want to consider removing my comment in the CSS file after the width - and remember to replace it with the width that you wish to have it set to (I just chose a random number).

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.