Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

css problem, it is not centered?

 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
1.JPG
[Thumbnail for 1.JPG]
2.JPG
[Thumbnail for 2.JPG]
3.JPG
[Thumbnail for 3.JPG]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the content in a block element such as <div> element, give the element a width, and make the left and right margins auto.
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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










Capture.JPG
My header
[Thumbnail for Capture.JPG]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic