File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes css problem, it is not centered? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "css problem, it is not centered?" Watch "css problem, it is not centered?" New topic
Author

css problem, it is not centered?

william chaple
Ranch Hand

Joined: Mar 08, 2013
Posts: 127
Ok thanks for the previous help; I am on to make a new topic about the situation. I noticed now, nothing is aligned when zoomed out "or a center view when zoomed out"
Also, everything looks aligned when zoomed in and centered. I actually went to my works computer and opened up the page and noticed or was more out towards the sides this time. What part in css does that?


[Thumbnail for 1.JPG]

[Thumbnail for 2.JPG]

[Thumbnail for 3.JPG]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

Put the content in a block element such as <div> element, give the element a width, and make the left and right margins auto.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
william chaple
Ranch Hand

Joined: Mar 08, 2013
Posts: 127
what if I have

will that work if I zoomed out?

I also noticed like theres a body and within that body there is a container. like a long vertical box

i tried something similar but when I zoom out, all the words and stuff passes thesections I want it to be in.

Lock theres a block of words on the right, and the words, when zoomed out, starts hitting the pictures i have on it the page (only when zoomed out)

is that fixed by auto margin as well?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

william chaple wrote:what if I have ... will that work if I zoomed out?


a) Please try it before asking
b) No, it's not valid syntax (you can't give two values to a single margin)
c) That's not what I said to do

is that fixed by auto margin as well?

It seems like you are looking for a magic bullet. It doesn't exist. You need to analyze the CSS for every part of the document and apply rules as required.
william chaple
Ranch Hand

Joined: Mar 08, 2013
Posts: 127
I see what you are saying. I actually did that and it worked.

I did left and right margins auto; however, I am actually having problems with the header. I know the syntax is right. All margins move left, top work but right and bottom wont move at all. I tested it on a #box and it works and moves any direction I tell it to. I did both left and right auto, and it aligned perfect. However, the content inside wont move in the header for some reason. The links inside is where I am trying to left and right margin auto. the .header does not work neither right bottom. but left and right auto would work but not with the contents inside













[Thumbnail for Capture.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: css problem, it is not centered?