ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

webdesigners in here please. simple question



  20VT Clio & 9-5 HOT
iv been building a website for somone. bit rusty with dreamweaver (v8) but getting back into it!

Basically iv made the site using tables, which the outer table has been centre positioned so that the site is in the middle of the browser, and the outer table has been set to a fixed width of 720px. all pretty straight forward, just a header, footer, left menu, and main content frame.

I've used CSS for everything, and it all works spot on. the only thing I cant get my head round is layers!

Basically I want to use layers, as i want to do some certain behaviours, and also be able to add text over parts of an image on the page.

but the layers are always 'absolute' positioned from the top left corner of the browser and move about when placed anywhere on my site design (once previewed)

How can I use layers that stay where they are drawn? surely there is a simple solution.

it works if the whole site is positioned left, but i want it central in the browser!

I know using layers in cells isnt the best idea, but what other options are there?

thanks!
 
  UR 197, AB 182 FF
Best way is to use javascript, it forces the layer to stay at an exact point my working on the redraw event (I THINK).. or some event.. Sadly I havent done any layers for a long time. Bet you could find out by viewing the source from some geoshitties page though... they always use that kinda crap for their banners.
 
Text over an image is easy. Have the image as a background for a div. Have the text inside the div. Use padding (or margin - can't remember) to move the text into position where you need it. No need for absolute/relative positioning.

To centralise a site on a page, use

<style type="text/css">
body{
margin:0 auto;
}
</style>

That'll work with most browsers but may need a hack for it to work in IE
 

Red Cup

ClioSport Club Member
  Focus RS
Padding. Margin will add whitespace around the background image. You'll need to add a width to the body as well or it will default to 100%.

margin:auto; works fine in IE if it's not in quirks mode, so make sure you have a valid DTD.
 


Top