19 Replies - 3335 Views - Last Post: 13 December 2010 - 05:59 PM

Re: Help Centering Layers in Dreamweaver 8

The only reason I used AP's is because I sliced the site in Photoshop and wanted to add content over top of the sliced layout. Is there an easier way of achieving this?

I've never understood the thought behind slicing an image up only to put it back together again. It would be much easier to put it as a background image of a containing div and have all your content flow naturally, in other words, get rid of all that absolute positioning.

I thought position: relative; might bring your content around where it's supposed to be but I'm not seeing it.

Re: Help Centering Layers in Dreamweaver 8

Posted 13 December 2010 - 11:46 AM

The reason of slicing images in photoshop is because it's quick, efficient, and it allows you to make navigation buttons easily. It also creates the html of the site layout. It's easy for graphic designers since photoshop is our main tool. I like the method. All I want to know is this: If I go to http://www.realidrea...misaligned.html, I see that the twitter bird is misaligned. How do I know which #..... tag is the twitter bird? And then how do you know what values to place in the following fields to get the twitter bird back in its original spot?

Re: Help Centering Layers in Dreamweaver 8

The only reason I used AP's is because I sliced the site in Photoshop and wanted to add content over top of the sliced layout. Is there an easier way of achieving this?

Yes, that should be the background image of your containing div. That way you can put stuff on top of it without all the ap.

Quote

It also creates the html of the site layout

But that's the very problem.
DW is famous for spitting out crap code like this. This is how we used to build websites, I mean, spacer.gifs? Really?
There are much better ways now.

It's not like it's a major sin or the end of the world, putting up a site like this, but it is representative of your knowledge and ability. If I was looking for someone to build a site for me and saw their company webpage was built with tables and invalid code I would leave without looking at anything else.

Try a layout that lets the elements flow naturally. Valid, semantic code without the tables and all that absolute positioning. Then, if there is a need to, it's fine to absolutely position an element or two.

Re: Help Centering Layers in Dreamweaver 8

Posted 13 December 2010 - 04:20 PM

Ok. I understand. I just don't know how to do it. I know html, but I don't know CSS and using AP elements allowed DW to write my CSS for me. I see what you mean, however does this mean I have to redo my whole site? If I make a background image in DW it wants me to repeat:x or repeat:y and if I choose repeat:none it doesn't center the background. I just love the way my website looks as far as design and where everything is placed (on my resolutions)lol. If it is possible to keep my website looking the exact same way and having the same navigation, etc. I am open ears.

The new code causes both top and bottom navigation bars to disappear for some reason.

The new code causes both top and bottom navigation bars to disappear for some reason.

That was not intended as a replacement, just an quick example I wrote that shows how to use background images and place divs without tables or ap. The menus are not there because I didn't put them there.