The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Problem with background image alignment
kierdraven
post Apr 1 2012, 10:25 PM
Post #1





Group: Members
Posts: 3
Joined: 1-April 12
Member No.: 16,831



Hi there,

I am new to thie forum so i'll start off with saying Hello! I am an intermediate skill levelled web designer that does it for a hobby, not professionaly.

Anyhow, here's my problem. I'm building the next version of my website, and having issues with the background image being aligned to "true" center. My background image is just black with a couple of vertical lines that are to run seemlessly down the page, bordering the content that sits in the middle. I have an image at the top of the page that has a couple of lines at the base of it to align with the background image, but they just will not line up. It appears the actual background image is JUST off center, and I can't for the life of me get it to align properly.

Here's my BODY code in CSS:
CODE
body { background:url(***); background-color: #000; background-repeat:repeat-y; background-position:center; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}


I'm testing this in Google Chrome on a Windows XP PC. The same problem occurs in Apple Safari. In Mozilla Firefox it displays fine, however there is a different issue with the table that i'll address in another area of these forums lol. Any help/tips would be appreciated!

Thanks.

EDIT: I have enabled border="1" on the table so you can see the alignment issue.

This post has been edited by kierdraven: Apr 1 2012, 11:16 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 1 2012, 10:54 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Hi! smile.gif

I think I see it in Safari Win, but not in Iron (which should be the same as Chrome but without the spying, or so they say). The background is a little bit to the right, is that what you see? Or the table is a bit to the left, whichever it is.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
kierdraven
post Apr 1 2012, 10:57 PM
Post #3





Group: Members
Posts: 3
Joined: 1-April 12
Member No.: 16,831



Hi! smile.gif

Yes, the background is a bit to the right so not quite "center" as i'm instructing it in my CSS code. I'm pretty confident the table is true "center"...

QUOTE(pandy @ Apr 2 2012, 03:54 PM) *

Hi! smile.gif

I think I see it in Safari Win, but not in Iron (which should be the same as Chrome but without the spying, or so they say). The background is a little bit to the right, is that what you see? Or the table is a bit to the left, whichever it is.


This post has been edited by kierdraven: Apr 1 2012, 10:58 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
kierdraven
post Apr 1 2012, 11:05 PM
Post #4





Group: Members
Posts: 3
Joined: 1-April 12
Member No.: 16,831



I think i may have fixed it!

specifying the following CSS seems to have helped!

CODE
table { table-layout:fixed;}
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 12:08 PM