PDA

View Full Version : slicing layout problem



firstborn01
June 7th, 2004, 06:56 PM
i am having trouble slicing my layout and getting it to work correctly. it's a pretty simple layout with the nav buttons on the side and the content next to it. when i go to edit it in dreamweaver the menu buttons always spread out even though i have the side, content and under the menu cells set as a background images.

hopefully this is all making sense to you guys.

i've tried doing it several different ways but i always get the same result. i am just all out of ideas. so i figured you fine people would know what to do. thanks in advance.

dave

Yeldarb
June 7th, 2004, 06:57 PM
:huh:

Is there a question?

firstborn01
June 7th, 2004, 07:03 PM
haha, sorry about that. i got a little trigger happy... it's been a long day :crazy:

Yeldarb
June 7th, 2004, 07:18 PM
Do you have an example of what you're talking about?

DDD
June 7th, 2004, 07:32 PM
one bit of advice. Sometimes it is better to build your layouts with layering in mind instead of one big sliced object. What I normally do is take for instance the navigation. It will be part of on big image in the beginning when I show the client. Now when I am slicing I will just make one big slice where the nav will be. The I remove the nav from the big image and make it its own image then slice it up separately. Export both as separate sliced files. Now in DW I open the main big sliced file. Select the cell where my nav will go. Now import my nav slice into that cell. Gives you more flexibility in a long run and easier to manipulate code and scale certain areas while not messing with one area. So you essentially end with elements. And if you want to get real fancy you make them library items..

Hope that makes sense. Basically you have to plan your files and pages.
I really need to stop giving up all my ideas.....lol. for free at least...lol

MissionSix
June 7th, 2004, 07:46 PM
if your in dreamweaver and you find an EMPTY <td> </td> meaning exactly like that, nothing inbetween, add a &nbsp; in between those two <td>'s. this will spread make those appear the right distance apart which will in turn make your layout look correct.

another bit of advice, start @ www.w3schools.com learn xhtml and CSS and code with <div>'s instead of relying on crappy programs to do the coding for you.

DDD
June 7th, 2004, 08:06 PM
not to nit-pick but instead of what mission6 said if you want proper validation I find it better to declare widths and use spacer gifs rather than &nbsp's. Those tend to be very problematic. But you should get brought up to speed in XHTML although I dont touch the stuff much myself. DW = crappy? :m:

MissionSix
June 7th, 2004, 08:42 PM
set all your td widths (style="width:100px;", change the width) to the correct width and leave the last one without the width.

Then fill your remaining <td> widh the &nbsp; and it should fit right.

I was assuming you already had your <td>'s containing images already set with widths when i posted the other post.

And DDD, i suggest learning xhtml... it is alot faster coding that html3 and it improves multi-browser capability.

edit: if you wanted it to validate, you would not use spacer gif's in a table. Infact you would not use a table at all with images in it.

DDD
June 8th, 2004, 12:02 AM
I am not a big fan of it....although I know it. I am just so used to tables. I have good success with browser compatibility too. But it does seem like an emrging technology and I may have a site version for it. Thanks for the tips

firstborn01
June 8th, 2004, 12:16 AM
thank you for all of your replies. i didn't think this would spark such a debate. as for me, i am not a professional web designer. it's just a hobby for me so the ease of use that photoshop, imageready and dreamweaver provide work perfectly for me... for the time being.

well i went into my html doc. and made sure that all of the background images were set as background and that they had the space in there. all of the widths were also set. but whenever i add text the menu spreads out. i have included a picture just in case you don't know what i am talking about...

http://www.davekoen.com/messed up.gif
hope that helps!

dru_nasty
June 8th, 2004, 06:17 PM
This is primarily directed @ mission6 & DDD. Sorry to bump in 1st born.
Im contemplating what to do in this situation. I have a client that wants to update some text on a certain page himself. With that in mind, I'm designing the full layout in fireworks,(buttons and all) which I normally do. Then what I usually do is make a slice where I want to be able to add text in DW. (when I import into DW i just select the slice and delete,... u know what I mean). And I posted this in server side by the way. Is it possible for me to set up maybe a simple text.php file that the client can update himself. Then in my xhtml page where the layout is (and the empty slice) I can have that particular ssi appear there and also control its attributes with CSS?
:puzzle:

Yeldarb
June 8th, 2004, 06:29 PM
yeah, it is definitely possible (and very easy to do) just add in

<?PHP
include "text.php";
?>

where you want the content from text.php to appear.

dru_nasty
June 8th, 2004, 06:34 PM
Nice! as long as its possible, now I just have to figure out how to do it.
Thanks for helpin here and over at server-side Yeldbarb!

firstborn01
June 9th, 2004, 05:09 PM
sorry to interupt this lovely conversation but i am still no closer to solving my problem :smirk:

i've been playing with it whenever i get a chance to but still nothing...

PLEASE HELP ME!!!

dru_nasty
June 9th, 2004, 05:15 PM
hmmm..... It seems to me that whatever your editing is becoming bigger than what the layout originally was. Like your pushing spacer.gif's around or something. Try to embed the whole layout in a DW table to maybe keep it in line. If your knocking out slices to add content in DW you have to keep the content contained w/in that slice.
All I can say is try searching up on "tiling."

firstborn01
June 9th, 2004, 05:31 PM
well i am not knocking out slices... i don't think... what i am trying to do is stretch one slice to hold more content. but when i do that the menu buttons spread out as you can see above.

what do you mean by "embed the whole layout" is that like make it all background images? and if that is so, how will that effect my rollovers?

and one final question... would it just be easier to do the menu in flash and then put that in the space where the menu is now? the reason that i ask is will it move the menu down when i try to expand the main slice?

i am so confused. hopefully someone can help soon.

firstborn01
June 9th, 2004, 05:44 PM
oh yea... i forgot to mention that if nobody has any ideas then i will be forced to use iframes.... and i am sick of iframes.... so don't make me do it... please...

dru_nasty
June 9th, 2004, 06:58 PM
No! Frames are a bad idea. From you trying to stretch a slice that is causing everything to distort. Even though you see white space in your layout doesnt mean there isn't anything there. There are transparent spacer.gif's there that keep all of the slices you made in line. Any size manipulation by any of your slices will result in distortion. What I meant by using a table, is start with a blank DW page, insert a table the same size as your layout, then insert your layout into the table. But if your trying to stretch a slice that probably won't work. You could make the menu in flash and set up a table in DW to put it in. Or, think about maybe making everything a seperate peice, like nav bar, header, footer, etc. And lay the page out using <div> tags (CSS). When I mentioned tiling, heres what I meant. http://www.macromedia.com/devnet/mx/fireworks/articles/layout_editing_13.html

DDD
June 9th, 2004, 08:24 PM
look at the 4th post...mine.....That is what you want to do. WHen you content scales verticallly it takes the nav with it. The best thing to do is nest another table with the nav in it.

firstborn01
June 10th, 2004, 07:57 AM
this is stupid... the css tutorial was form mx 2004 and i only have mx. i thought it would be the same but it is telling me to do things with stuff that isn't there.

i am just going to change my design so that i can get it to work. i am sick of this.

DDD
June 10th, 2004, 11:20 AM
seriously dude, nest your tables. That will solve your problem plus make it easier to update. It just requires a little more planning.

firstborn01
June 10th, 2004, 11:31 PM
i tried that... it didn't work. now i am just sick of my layout. i am going to try again. and i think i am going to use an iframe because then it is easier to incorperate my blog into the site. oh well. thanks anyways for all your help.

MissionSix
June 10th, 2004, 11:39 PM
again.. DONT USE IFRAMES use <div>'s

<div style="width:100px; height:100px; border:0px; overflow auto;">

ironikart
June 10th, 2004, 11:52 PM
divs are a pain in the arse as well... follow DDD's advice. Nested tables are the way to go if you're using a wysiwyg editor. Don't give up on it, once you've got the techniques down the effort to learn will pay for itself. My old site template I was developing for a mmorpg a little while back is rife with nested tables and database content. If I didn't nest them there is no way I would be able to arrange the content, or even apply particular CSS styles (like borders).
http://www.nexuschronicles.com/?template=1

Don't use frames!

firstborn01
June 13th, 2004, 02:05 AM
i am such a bastard....

i went back and totally re-did my design but i got it all to work this time. please take a look at it and let me know what you think.

www.davekoen.com/version2 (http://www.davekoen.com/version2)

not all of the pages are up yet and not all of the pages have something on them. also, the news page has a random image at the top everytime you reload. eventually i want to do that on every page but i just got it to work tonight so i haven't gotten around to it yet.

so please let me know what you think.

thanks,

dave

MissionSix
June 13th, 2004, 03:06 PM
heres a tip.. use some server-side scripting... and then you can use php-includes and have a header / footer, and basically your site would be alot easier to impliment. And you wouldnt have to change the header on every page, only on one.

firstborn01
June 13th, 2004, 03:27 PM
i would love to do that but my webhost doesn't include php in its services unless i pay another $60 a month or something like that.

but other then that, how is the design and everthing?