Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

My website isn't centered in all browsers


  • Please log in to reply

#1
cynd54

cynd54

    New Member

  • Member
  • Pip
  • 7 posts
On my computer, all of my websites are centered in all browsers, but my partner and my friend say that my sites are way on the right when they use Internet Explorer.
My website is Placements USA

Please help me.
  • 0

Advertisements


#2
ash004

ash004

    Member

  • Member
  • PipPip
  • 57 posts
Well, i don't know what type of css U had use for your website, what you Must do know, Using software editing like dreamweaver, U can check the code of Like by example Use center code which is <center> </Center>

Where you had type your words, Put it all Into the center and this might fix the problem hope its :help:
  • 0

#3
cynd54

cynd54

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
Thank you, but I have already tried that.
  • 0

#4
AstraNut

AstraNut

    Member

  • Member
  • PipPipPip
  • 465 posts
HTML: "Byte-Order Mark found in UTF-8 File" Need to remove this. Set your web editor's option to NOT use BOM.

CSS problem: "File not found: import file:/C:/Users/Cynthia/Documents/Placementsusa/placementsusa.css: Operation not permitted" Can not link files from online to your hard drive.

Centering an element requires setting a width that is less than 100%, using a proper document type and using the CSS property: margin: 0 auto; This is done in the CSS that styles the element. Example:

Example as an ID:

#selector_name{
width: 90%;
height: 600px; /* optional */
margin: 0 auto;
background: #fff url(path to non-tiled image) no-repeat center scroll;
}
Example as a Class:

.selector_name {
width: 90%;
height: 600px; /* optional */
margin: 0 auto;
background: #fff url(path to non-tiled image) no-repeat center scroll;
}

HTML for Class:
<div class="selector_name">Content here</div>

Example as an ID:

#selector_name {
width: 90%;
height: 600px; /* optional */
margin: 0 auto;
background: #fff url(path to non-tiled image) no-repeat center scroll;
}
<div id="selector_name">Content here</div>

Edited by AstraNut, 28 March 2013 - 08:57 PM.

  • 0

#5
cynd54

cynd54

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
I use Expression Web (Microsoft). I am not a designer so I don't understand exactly what you are saying to do.

How can I fix this?
CSS problem: "File not found: import file:/C:/Users/Cynthia/Documents/Placementsusa/placementsusa.css: Operation not permitted" Can not link files from online to your hard drive.

And please, can you tell me exactly what I should do? What is "selector name"? Maybe if you just got a bit more detailed so that I can understand.

Thanks so much for your time. It is VERY kind of you.

Edited by cynd54, 28 March 2013 - 09:58 PM.

  • 0

#6
AstraNut

AstraNut

    Member

  • Member
  • PipPipPip
  • 465 posts
Look between your head tags for your CSS file link. It shows this:

"<link href="placementsusa.css" rel="stylesheet" type="text/css" /> <link href="file:///C:/Users/Cynthia/Documents/Placementsusa/placementsusa.css" rel="stylesheet" type="text/css" />"

The file "placementsusa.css" should be uploaded to the server (if not done already) with the correct path used. The second one should be removed or commented out since it refers back to your hard drive. I didn't see any character encoding tag. You are using overkill by using full paths in links since you have "<base href="http://placementsusa.com/" />".

Do not name files using white space unless you plan on putting the space character (%20) where the spaces are. Example:

This - "Nurse Practitioner Jobs_nurse practitioner recruiting_Physician Assistant jobs_recruiting.jpg"

To this - "Nurse%20Practitioner%20Jobs_nurse%20practitioner%20recruiting_Physician%20Assistant%20jobs_recruiting.jpg"

See: Absolute and Relative Paths: http://webdesign.abo...a/aa040502a.htm

The "selector_name" is just an example placer name for whatever id/class/tag name you are are styling.

The byte-order mark (BOM) in HTML

Remove Byte Order Mark (BOM) Character

You page also has a lot of empty span tags. These are from web editors that may not be properly set or are not true web editors.

Edited by AstraNut, 29 March 2013 - 12:36 AM.

  • 0

#7
cynd54

cynd54

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
I think I did everything correctly, but the problem is still there. My site still won't center in IE.

No matter what. I sincerely appreciate you trying to help me.

Edited by cynd54, 29 March 2013 - 03:49 PM.

  • 0

#8
AstraNut

AstraNut

    Member

  • Member
  • PipPipPip
  • 465 posts
This is incorrect: "<div=wrapper>" Did not find "wrapper" or its CSS rules in your CSS file. Not sure if it is an id or class but doesn't matter right now since you have no rules for it. I think if you set rules for wrapper and change the div error, IE will center page.

Example:
#wrapper {
width: XXXpx; margin: 0 auto;
}
Can use a percent if wanted.

Wrapper div is just "<div id="wrapper">"

Still 11 HTML errors.

CSS parse error:

} .newStyle19 { font-size: medium; font-weight: bolder; color: #333333; }


Validating:

Why Validate?: http://validator.w3.org/docs/why.html
CSS Validator: http://jigsaw.w3.org/css-validator/
HTML Validator: http://validator.w3....ri with_options
Unicorn - W3C's Unified Validator: http://validator.w3.org/unicorn/

HTML Tidy report:

Result: 11 errors / 0 warnings

line 2 column 9 - Error: an attribute specification must start with a name or name token
line 2 column 9 - Error: element "xml:lang" undefined
line 22 column 4 - Error: an attribute specification must start with a name or name token
line 322 column 5 - Error: end tag for "i" omitted, but OMITTAG NO was specified
line 214 column 6 - Info: start tag was here
line 322 column 5 - Error: end tag for "span" omitted, but OMITTAG NO was specified
line 209 column 15 - Info: start tag was here
line 322 column 5 - Error: end tag for "span" omitted, but OMITTAG NO was specified
line 201 column 35 - Info: start tag was here
line 322 column 5 - Error: end tag for "span" omitted, but OMITTAG NO was specified
line 201 column 7 - Info: start tag was here
line 324 column 6 - Error: end tag for "div" omitted, but OMITTAG NO was specified
line 22 - Info: start tag was here
line 325 column 6 - Error: end tag for element "html" which is not open
line 327 column 1 - Error: end tag for "xml:lang" omitted, but OMITTAG NO was specified
line 2 - Info: start tag was here
line 327 column 1 - Error: no document element


You have the following in the wrong place (should be in body section): "<noscript> Placements USA is a healthcare jobs recruiting company. <a href="placementsusa.com">Learn more about Placementsusa.com.</a></noscript>"
  • 0

#9
cynd54

cynd54

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
Thanks so much! I used one of your links and am learning CSS.
You have been so very kind!!
  • 0

#10
AstraNut

AstraNut

    Member

  • Member
  • PipPipPip
  • 465 posts
You are very welcome.
  • 0

Advertisements


#11
N-R

N-R

    Member

  • Member
  • PipPip
  • 55 posts
I changed the body section margin in the css file from 250px to 70px or something like that see if this works.
I will attach the css file.

Hope that works for you I have tested it and it works in my browsers.

Regards
Nick

Attached Files


  • 0

#12
cynd54

cynd54

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
It wouldn't let me reply to your message on the messenger. Yes, please look at it and do some CSS.

I really appreciate this.
  • 0

#13
N-R

N-R

    Member

  • Member
  • PipPip
  • 55 posts
Hiya
See if this works for you :)
I changed the body section of the css to

}
body
{
margin: 0;
padding: 0;
padding-top: 10px;
text-align: center;
}
#centered
{
width: 800px;
text-align: center;
border: 0px;
padding: 0;
margin: 0 auto;

}

I've attache the CSS file below.
It wouldn't let me save the edited html file for you here so I will give it to you on a text file, you should download Notepad++ and load the text file into notepad++ then save it as your site name .html
Link for notepad++ here >>> http://notepad-plus-...oad/v6.3.2.html

You should also keep a back up of your original site on a USB key or disk.

Hope that works better for you, I haven't tried it yet on more than 1 PC as I've been busy getting ready to go into hospital so I wont be around for a while.

N-R

Attached Files


  • 0

#14
BrettASykes

BrettASykes

    Member

  • Member
  • PipPip
  • 23 posts
Make a wrapper around everything and in the CSS make Margin:Auto;. That should do the trick!
  • 0

#15
cynd54

cynd54

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
How do I do that?
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP