Jump to content

Alignment Issues


JeanieTallis

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

www.myvee.co.uk

 

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 {

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

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>

 

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. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
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.