PDA

View Full Version : Absolute Positioning Problems


Adam_G
06-17-2008, 09:18 AM
Hi all, I'm a new user to Dreamweaver and I'm just in the process of building my first site having read "The Missing Manual" (great book btw).

I've made the common page elements (top banner, sidebar image and background image) using div tags and absolute positioning.

Whilst the results look great in Safari, when I open in IE 5.2.3 (Mac), some of my absolute positioned elements move down and right by about 10 pixels.

I think it might have something to do with the fact that my bounding table (800x600) doesn't appear to run right to the edge of the page. Should I be applying some sort of padding round the whole page? Can I reposition the table to 0px-0px? Any help would be greatly appreciated, I've come this far, don't want to fall at the first hurdle!

Thanks in advance
Adam

m1a2x3x7
06-17-2008, 01:07 PM
Well IE for mac is over 5 years old and has poor support for CSS. I really wouldn't worry about IE for Mac. Market share shows that people that use IE5 is less then 1%. In fact its .09%. What you see on IE for mac won't be the same for IE on windows.

But if your determined to get it to work. Post your code and someone will take a look.

domedia
06-17-2008, 01:21 PM
Ie5 for mac is a dead browser, you don't have to worry about it. Good thing, because it was notoriously difficult to use CSS for.

Adam_G
06-17-2008, 02:41 PM
Thanks for the advice, it's fine on Firefox and IE7 on the PC so I'll run with it. I didn't realise Ie5 was so out of favour.
Phew!
Really pleased with my first efforts, thanks again.

Adam

Rob_Che
06-17-2008, 11:02 PM
Market share shows that people that use IE5 is less then 1%. In fact its .09%.

Interesting- Do you know where I could find the facts and figures for other browsers ?

Ricky55
06-17-2008, 11:28 PM
http://www.w3schools.com/browsers/browsers_stats.asp

If you are using the standard make up of Header x2 columns and a footer you shouldn't even need to use absolutely positioned DIV's. Shouldn't these just be floated?

Corrosive
06-18-2008, 07:10 AM
http://www.w3schools.com/browsers/browsers_stats.asp

If you are using the standard make up of Header x2 columns and a footer you shouldn't even need to use absolutely positioned DIV's. Shouldn't these just be floated?

Yes!

I'm also not sure what Adam G means by "bounding table (800x600)". Suggest you check out two and three column layouts using pure CSS. :-D

Adam_G
06-18-2008, 01:16 PM
Thanks Corrosive, I'll look into it. As I said, I'm a complete novice so every bit of advice is greatly appreciated.

I think half the problem was that I was previewing in both Safari and IE5 whilst building so when things didn't work properly, I was trying to find workarounds.

I'll know in future. Everything works fine now, will it cause problems that I've set the header and sidebar using DIVs with absolute positioning?

domedia
06-18-2008, 02:13 PM
Interesting- Do you know where I could find the facts and figures for other browsers ?
Remember that the w3schools data is different than any 'average' website.
w3schools visitors contains almost exclusively by people designing websites.

Key here is to get data of your own target audience. You do not develop websites for w3schools visitors (most likely), so do not let those numbers decide what you're doing.

Look at your own browser stats, you should have one in the admin area of your website that your host provides.

Corrosive
06-18-2008, 03:57 PM
Thanks Corrosive, I'll look into it. As I said, I'm a complete novice so every bit of advice is greatly appreciated.

I think half the problem was that I was previewing in both Safari and IE5 whilst building so when things didn't work properly, I was trying to find workarounds.

I'll know in future. Everything works fine now, will it cause problems that I've set the header and sidebar using DIVs with absolute positioning?

Honestly fella. I wouldn't worry about IE5 or 5.5 they are way out of date and I'd be more concerned with 'future-proofing' your design than worrying about a miniscule part of the population. I tend to use relative positioned divs for the structure of my sites (header, nav bar, columns, footer etc.) and then put elements in with APDivs if appropriate. This may be a crazy approach but it seems to work for me OK. :lol:

Adam_G
06-18-2008, 04:35 PM
Thanks again Corrosive, looking at your site, it looks like a good way to go!
Is it the done thing to post a link on here and ask for feedback? I'd be interested to hear your thoughts...

Corrosive
06-18-2008, 05:01 PM
Thanks again Corrosive, looking at your site, it looks like a good way to go!
Is it the done thing to post a link on here and ask for feedback? I'd be interested to hear your thoughts...

As Team America said... **** Yeah!

I love looking at what other people are doing and the kind folks on here can give better feedback/hints/tips/fixes if they know what they are looking at!!

You can post code as well.

Adam_G
06-18-2008, 05:22 PM
http://www.raywittstransport.co.uk/index.html

There you go, not exactly glamorous but a nice simple one to start I think.
I need to sort out the navigation buttons as the transparency looks crap over a coloured background, but I'll wait for feedback from the customer before I start faffing.
(I know, I know... My own site's rubbish - I put that up as a temp 3 years ago when I set up the business and never got round to having one done. I can sort it out myself now!)

Cheers
Adam

Corrosive
06-18-2008, 05:31 PM
http://www.raywittstransport.co.uk/index.html

There you go, not exactly glamorous but a nice simple one to start I think.
I need to sort out the navigation buttons as the transparency looks crap over a coloured background, but I'll wait for feedback from the customer before I start faffing.
(I know, I know... My own site's rubbish - I put that up as a temp 3 years ago when I set up the business and never got round to having one done. I can sort it out myself now!)

Cheers
Adam

Hi Adam

Looks good mate. Just a couple of things...Have you thought about having it centred on the page? There's a good tutorial on here about how to do it (link anyone??) with CSS. Also you might consider having text underneath the buttons as links, as well as the buttons. You might get into trouble with screen readers otherwise. You can style them to only underline on rollover and it won't ruin your design.

Hope this helps...going for beer now :-D

Adam_G
06-18-2008, 05:34 PM
Cheers, I did want to centre it, so a link to that would be brilliant if anyone can help.
And yes, I thought the text should be links too. I'll fettle it.
Enjoy that beer!
Cheers.

domedia
06-18-2008, 07:30 PM
*cough* From the top menu:
Tutorials->Centered content with CSS

And that's the last time I hold you guys' hands ;-D

Adam_G
06-18-2008, 07:58 PM
Thank you! I imagine that like most people, I've found this site when needing a quick fix. Now that I've found it, I'll have a good browse round and see what else it has to offer before asking dumb questions! I promise.

Cheers though, great website and excellent advice so far.
Adam

Corrosive
06-18-2008, 09:25 PM
*cough* From the top menu:
Tutorials->Centered content with CSS

And that's the last time I hold you guys' hands ;-D

Surely you don't mean that!!