When you have a <body> tag in html and you put an attribute in that tage lik this: background="bkg.jpg"> is there a limit to the size of the bkg.jpg? It should always be as small as possibler, right?
Suppose a client wants 4 images: one in the upper left corner, one in the upper righ, one in lower left and one in lower right corner, the only solution is to make one big background image, right? And of course making one big image, that will make it heavy. So it is better to advice him not to do this, right?
Right. Only possible easy way is not to put it in the background - use a table and put one in each corner and align them to the edge. This may actually be better because text is harder to read over graphics.
Using a large image to cover a background is just about impossible because you don't know what screen resolution the user is using - if you made the image 640x480 to allow for the smallest screen size, your image would be tiled (repeated over and over) in a 1600x1200 screen resolution.
If you need the four images to be backgrounds, you may use
<img src="imgname.gif" alt="" style="position: absolute; left: 0px; top: 0px; z-index: 1">
... and so forth for each image.
And for the body tag, use
<body style="z-index: 2">
What this does is it places the 4 images at the four corners (or where ever else you need them). z-index of body being higher, the text in the body will display on top of the images, making it look like a background.
MOVING THE TEXT TO THE MIDDLE
Thats a tricky question. "style: left: auto; right: auto" should work, but it doesn't in some browsers (read "IE")
Doing a "text-align: center" in IE incorrectly centers block level elements. Mozilla correctly centers inline elements. So basically, you need a workaround that tricks IE into using "text-align: center", while retains correct "style: left: auto; right: auto" for standards compliant browsers. I am not a pro at this, so don't take my word for it
I would like to know how to make the 'whole page' center like that and keep the integrity of the layout no matter what resolution of the user's browser.
Well, I spend a lot of time on that site for the message boards. I like the layout, and wish I could do something like that. I am trying to learn about css. I have Coffee Cup web dev software, and they have a css tool, but i am not sure how that helps me with my layout issue. If you want to look at my lame ass site I am trying to redo, it is
In a world without walls and fences - who needs Windows and Gates?! - Unknown Author
"And there's Bill Gates, the...most...famous...man in the...ah...Microsoft." -- A TV commentator for the 2000 Olympics.
Originally posted by ..::Bro::..
[B]what i meant was NON supported css2.
For those the images will be placed where they are physically located in the markup.
However such browsers are quite rare nowdays.
what about screen resolutions?
Positioning will work at any screenresolution.
How do I position everything to "move" to the middle of
the screen?
Let's say, my template is 755px long & I want EVERYTHING
to move center justified for those who have a higher resolution?
You mean if you want the corner images to be placed in a centered "box"?
You just position a box into the center and from there use the exact same code. Being in a positioned box the top/left/right/bottom values will be relative the new box, not the page
Originally posted by Strumey
I am trying to learn about css. I have Coffee Cup web dev software, and they have a css tool, but i am not sure how that helps me with my layout issue.
Well, CSS is easy to learn but immensly powerfull and intricate in ways that are not easily programed.
I have not really seen any CSS capable editor software that will alow you to do anything but scratch the surface of what CSS can do.
Hand coding is pretty much required, but you don't have to learn everything at once. Lreaning as you go, picking up the stuff you need right at the moment you need it will work just fine.
To do a center layout with CSS you could eg do this
<body style="text-align:center">
<div style="width:700px; margin:0 auto; text-align:left">
The textalign lcenter on body is to work around an IE bug
</div>
</body>
Bookmarks