Welcome to WebmasterWorld Guest from 54.205.115.177

Forum Moderators: open

Message Too Old, No Replies

CSS margins and Dreamweaver

Not displaying properly in DW, fine in browser

   
7:57 am on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am trying to move over to CSS layout without losing the ease of use of Dreamweaver.

There is a problem when using a CSS style to control margins. Dreamweaver's WYS positions the text way out of line with the WYG.

Assuming that this is not just a quirk of my setup, does anyone know any 'work arounds'?

Otherwise I might have to switch to Adobe GoLive (bleagh.. new tool to learn)

PS
I know I should be doing all of this in an HTML editor, but I am lazy and logical discussion about the merits of HTML coding usually convinces my logic circuits but can't get past the firewall set up by my laziness circuits:)

[edit] - just looked at GoLive - its worse - help![/edit]

9:12 am on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have been using Dreamweaver with CSS for about 2 years now and often use margins, everything seems the same in WYS and WYG.

Maybe check your DW prefs?

9:31 am on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Knighty - are you specifying page margins or margins within the css?

When I use "margin-left:120px" in my style sheet, Dreamweaver is positioning the text at 90pixels from the left, not 120

Previewing in the browser shows correctly.

If I set page margins to 120px it works correctly.

9:57 am on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well i just positioned it "margin-left:120px" (margins within CSS) and its spot on.

At least thats what the ruler in DW is telling me.

1:40 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hmmmm.... this is getting confusing.

I am using:

.margintest { font: 12px Arial, Helvetica, sans-serif; color: #CC0000; margin-left: 120px}

When I apply that style to a <span> or <p> tag, it is positioned 90px from the left on DW's Ruler. It scales it to 3/4 of what it should (ie 320px goes to 240 px etc)

If I specify the page margin (in Page Properties) to be 120px it shows 120px

If I create a layer and specify 120px wide, that shows correctly too.

None of these errors show when the site is previewed, but it makes it bl@*dy hard to lay out the page.

Is there something obvious that I have missed?

2:39 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Though i am a big fan of dreamweaver the wysiwyg, some times mis-reports code, i have to assume that you have looked at it in a browser !
3:06 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Its fine in the browser, and in some other 'lesser' wysiwyg software.

Guess I'm stuck with it - bah.

3:20 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




Do the <p> or <span> tags you're attaching it to already have their own CSS styles applied? That could screw up how its displayed.
3:34 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I tried it out on a completely new page.

One line of text and only the one style specified.

I am using DW4 - (I assume you are using the same Knighty?)

I will try it out on a mates machine and see if it is the same on his.

[edit] just tried it on another machine with a virgin installation of DW4, same problem - looks like I am stuck with it[/edit]

11:32 am on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how bizzare..im using 4....maybe check on the macromedia site, usally bugs will have a fix.