html- alignment issues

Posted:
in General Discussion edited January 2014
i cant seem to get my swf file to line up right to the top left corner. can u not make it exact to the top corner? i dont want any background showing, just the swf file. thanks.

Comments

  • Reply 1 of 12
    johnqjohnq Posts: 2,763member
    Quote:

    Originally posted by Cam'ron

    i cant seem to get my swf file to line up right to the top left corner. can u not make it exact to the top corner? i dont want any background showing, just the swf file. thanks.



    In the BODY tag, insert these:



    leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"



    Two are Netscape two are IE/standard, need both sets for best compatibility.
  • Reply 2 of 12
    Quote:

    Originally posted by johnq

    In the BODY tag, insert these:



    leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"



    Two are Netscape two are IE/standard, need both sets for best compatibility.




    Yuck. That's not valid code!!



    You'd be much better off using CSS to do this.



    <body style="margin-top:0px;margin-left:0px;padding-top:0px;padding-left:0px;">



    The internet would thank you for not using broken, deprecated code.
  • Reply 3 of 12
    eureka! thanks, thats much better.
  • Reply 4 of 12
    Quote:

    Originally posted by Brad

    Yuck. That's not valid code!!



    You'd be much better off using CSS to do this.



    <body style="margin-top:0px;margin-left:0px;padding-top:0px;padding-left:0px;">



    The internet would thank you for not using broken, deprecated code.




    Better tell Macromedia to remove it from Dreamweaver MX then... that's how it does it unfortunately. I think they use CSS in Dreamweaver MX 2004 though. GG's MM!
  • Reply 5 of 12
    Sort of a tangent from the original topic... but how many web designers still use tables to do page layouts? I still have been, even though I think it's safe to say that the majority of folks are running 4+ (or perhaps even 5+) browsers that can handle pixel placement via CSS styles. Old habits die hard I guess.



    Have people switched over to solely using "layers" (damn you Netscape for ruining that term) and CSS positioning to design pages? Any good arguments for/against?
  • Reply 6 of 12
    Quote:

    Originally posted by dviant

    Sort of a tangent from the original topic... but how many web designers still use tables to do page layouts?





    Mama says table-driven layouts are the devil!!



    It's true. They are.



    Every serious web developer with half a brain and some properly-trained design skills should be using CSS layouts. It's no surprise to me that apps like Macromedia Dreamweaver are producing crap code. That's one of the reasons I strongly suggest people not use those tools.



    Any good arguments for CSS? There are lots! Here are just a few:

    http://www.sessions.edu/newsletter/S...interview.html

    http://www.iste.org/profdev/symposia...rtson/why.html

    http://www.westciv.com/style_master/...key_ideas.html

    http://tech.irt.org/articles/js135/

    http://css-discuss.incutio.com/?page=WhyCss

    http://linear1.org/gm/archives/00000142.php



    The biggest supporting reasons:
    • CSS separates content from layout, making it magnitudes easier and quicker to write and maintain.

    • CSS + HTML = faster load times.

    Any good arguments against CSS?



    Internet Explorer. Microsoft's support for CSS before IE 6.0 is very shoddy. Even in the latest version there are oodles of bugs that people are force people to hack and compromise their layouts.
  • Reply 7 of 12
    rageousrageous Posts: 2,170member
    I design using XHTML and CSS. no tables at all. It is much much easier.



    Brad pretty much nailed the pros and cons.
  • Reply 8 of 12
    johnqjohnq Posts: 2,763member
    Quote:

    Originally posted by Brad

    Yuck. That's not valid code!!



    You'd be much better off using CSS to do this.



    <body style="margin-top:0px;margin-left:0px;padding-top:0px;padding-left:0px;">



    The internet would thank you for not using broken, deprecated code.






    What ingrates.



    If you wanted CSS, say so...



    Otherwise I presume "newbie designing for Netscape 1.0"



    Brad, if it's valid enough for these forums to use, valid enough for Cam'ron!







    By the way: I am a CSS purist by day, (This next not directed to Brad ) so PLEASE spare me any subsequent tidal wave of pro-CSS arguments. You can't convince me more than I am already... )
  • Reply 9 of 12
    resres Posts: 711member
    I think that there are still too many people using old browsers to use pure CSS without any tables for layout, so I'm still using a mixture of tables and CSS in my designs.
  • Reply 10 of 12
    ide rather be using css, its just that i was never taught it. i dont really get how the two can be separate (css + html). how does the page load both? i guess i should go back to school and take a class on css and one on actionscript while im at it.
  • Reply 11 of 12
    johnqjohnq Posts: 2,763member
    Quote:

    Originally posted by Cam'ron

    ide rather be using css, its just that i was never taught it. i dont really get how the two can be separate (css + html). how does the page load both? i guess i should go back to school and take a class on css and one on actionscript while im at it.



    It's a great period in time to learn it since there is much more support for CSS, more resources for learning online and "relatively" few issues with CSS itself (I mean the specs are reasonably solid now).



    With CSS the browser merely overrides it's own preferred idea of how a given element should be rendered. Much variation exists between browsers and platforms on just how a given element "should" look. But they agree in general.



    HTML "ought to" only indicate markup (is this thing bold or a headline or a paragraph). Where things went wrong was when browsers decided to add page author-defined parameters and proprietary tags that other browsers didn't recognize.



    My original code is a classic example, I'm (not) ashamed to say.



    CSS says, wait, let's keep HTML strictly structural. Let CSS handle what things look like.



    A browser of course "needs" to at least format basic HTML in fairly a logical albeit simple manner. Usually headlines look bold and are larger. Paragraphs look like blocks of text, etc. but don't confuse a default render of plain HTML with a style.



    So if you design a page in HTML it will look a certain way. A bare HTML document will look different in each browser (potentially) because it's using each browser's default rendering of plain HTML.



    Add CSS and it will only look as different from bare HTML as you have defined it to. It depends on how much you have overridden using CSS.



    How can CSS and HTML be separate? Just imagine that when the browser reads the HTML, rather than formatting each element using it's own set of rules for how things display (possibly browser dependent) it instead looks for the CSS, be it inline or external.
  • Reply 12 of 12
    Awesome, thanks



    I've been working on a new site in GoLive, and two pages out of 9 had this exactproblem, using otherwise identical layouts.
Sign In or Register to comment.