954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Trouble with absolute positioning in CSS

He is what im trying to do, ive got a logo that i want to place around the center of your screen over my semi-complex background that is set up like this...

[IMG]http://i11.photobucket.com/albums/a160/woody33/help.jpg[/IMG]
The "logo" image will be placed over the tiled image, but when the browser is shrinked because of a user using a smaller resolution, for example 1024x768, but the image would remain on the right side of the tiling area when it expands for a higher rez.

Just a push in the right direction to what css and/or html i should use to get the job done would help. I can post some of my own code too, if needed.

Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

Can you post your code so we can see what you have already done?

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 



 
 
 

Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

first. separate the css of the document.

Pymes
Newbie Poster
3 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 
first. separate the css of the document.

Not sure what you mean...You can have your CSS and HTML all in one file. Do you mean seperate it so you can read it better?

Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

Since you are using tables and not divs for this, here is an easy solution...

[html] spacer.gif   spacer.gif [/html]

Use a transparent gif to keep your outer cells at a fixed width and set your inner cell to 100% width.

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 

Ok, i modified the code a little bit to fit my image paths ect. but now i got this repeat problem...i cant seem to figure out what is causing it...here is what it looks like:

[IMG]http://i11.photobucket.com/albums/a160/woody33/help2.jpg[/IMG]

Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

If that is a background image set by css, add the following:

background-repeat: repeat-x;

This will make the image repeat horizontally, but not vertically.

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 

Strange, it still has problems witht the table being copied downward, but the it only tiles the "swoosh_tile" accross in the first one.

Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 
Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

No...it has to do with your image widths being set to 540 and 457. Lower those to something reasoable like 100 or 150 and you'll get the result you are looking for.

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 

Ok, ive fixed the problem. It was the spacer images did not have a height value and were for some reason stretching the table far downwards. I set the height values of the spacer image to match that of the background images and it was fixed so that it works for both resolutions. Now my only problem is getting my logo image on top of that middle "stretched" area where it fits for both resolutions.

Woobag
Light Poster
33 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You