<div> withut linefeed?

Discussion in 'HTML' started by Frogleg, Jul 31, 2005.

  1. Frogleg

    Frogleg Guest

    Frogleg, Jul 31, 2005
    #1
    1. Advertising

  2. Frogleg

    Guest Guest

    "Frogleg" <> wrote in message
    news:...
    > How can I get a 'div' with no top margin? Or is there a better method
    > for doing this? Example of problem at:
    >
    > http://home.earthlink.net/~absolutelyfake/test.htm


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

    in the BODY tag
    Guest, Jul 31, 2005
    #2
    1. Advertising

  3. Frogleg

    Els Guest

    Frogleg wrote:

    > How can I get a 'div' with no top margin? Or is there a better method
    > for doing this? Example of problem at:
    >
    > http://home.earthlink.net/~absolutelyfake/test.htm


    That /is/ a div without a top margin ;-)
    It's a page with a top padding though. Either on <html> or <body> -
    fiddle to find the culprit :)

    Why are you mixing HTML and CSS for the look though? I'd change
    'bgcolor' to background-color to go inside the style attribute, and
    align:center on the div seems superfluous, as you already set a width
    and a left and right margin in the style too.

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Status Quo - ROADHOUSE - Roadhouse Blues - The Wanderer
    - Marguerita Time - Living On An Island - Break The Rules
    Els, Jul 31, 2005
    #3
  4. Frogleg

    Frogleg Guest

    On Sun, 31 Jul 2005 13:02:35 GMT, <> wrote:

    >
    >"Frogleg" <> wrote


    >> How can I get a 'div' with no top margin? Or is there a better method
    >> for doing this? Example of problem at:
    >>
    >> http://home.earthlink.net/~absolutelyfake/test.htm

    >
    >try
    >leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
    >
    >in the BODY tag


    Thanks. Works like a charm.
    Frogleg, Jul 31, 2005
    #4
  5. Frogleg

    Frogleg Guest

    On Sun, 31 Jul 2005 15:04:34 +0200, Els <>
    wrote:

    >Frogleg wrote:
    >
    >> How can I get a 'div' with no top margin? Or is there a better method
    >> for doing this? Example of problem at:
    >>
    >> http://home.earthlink.net/~absolutelyfake/test.htm


    >Why are you mixing HTML and CSS for the look though?


    Hiya, Els, and thanks. Why HTML? Because this is quick&dirty
    experimentation, and it's easier to tyoe and edit with HTML with
    "style" sub-directives. As I get it worked out, I'll use real CSS.
    Frogleg, Jul 31, 2005
    #5
  6. Frogleg

    Jedi Fans Guest

    wrote:
    > try
    > leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
    >
    > in the BODY tag


    this could be achieved far easier in css without relying on depreciated
    tags...
    body{margin:0;}
    Jedi Fans, Jul 31, 2005
    #6
  7. Frogleg

    Els Guest

    Frogleg wrote:

    > On Sun, 31 Jul 2005 15:04:34 +0200, Els <>
    > wrote:
    >
    >>Frogleg wrote:
    >>
    >>> How can I get a 'div' with no top margin? Or is there a better method
    >>> for doing this? Example of problem at:
    >>>
    >>> http://home.earthlink.net/~absolutelyfake/test.htm

    >
    >>Why are you mixing HTML and CSS for the look though?

    >
    > Hiya, Els, and thanks. Why HTML? Because this is quick&dirty
    > experimentation, and it's easier to tyoe and edit with HTML with
    > "style" sub-directives. As I get it worked out, I'll use real CSS.


    I didn't mean the style attributes, I meant things like align="center"
    and bgcolor="#d4d4d4". I can see the benefit of inline styles when
    experimenting, but I mean: if you already have
    style="font-size: 4em; font-family: helvetica, sans-serif;"
    why not change it into
    style="background-color: #d4d4d4; font-size: 4em; font-family:
    helvetica, sans-serif;"
    instead of adding bgcolor="#d4d4d4d" ?

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Shakin' Stevens - What Do You Want To Make Those Eyes At
    Me For
    Els, Jul 31, 2005
    #7
  8. Frogleg

    Toby Inkster Guest

    Jedi Fans wrote:

    > this could be achieved far easier in css without relying on depreciated
    > tags...
    > body{margin:0;}


    Better:
    body{margin:0;padding:0;}

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jul 31, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sck10
    Replies:
    1
    Views:
    1,917
    Steven Cheng[MSFT]
    Mar 23, 2006
  2. puzzlecracker

    JDOM withut namespace

    puzzlecracker, Feb 17, 2006, in forum: Java
    Replies:
    0
    Views:
    385
    puzzlecracker
    Feb 17, 2006
  3. Johannes Busse

    xsl:message without linefeed?

    Johannes Busse, Dec 7, 2004, in forum: XML
    Replies:
    4
    Views:
    1,083
    Johannes Busse
    Dec 8, 2004
  4. Matthias

    Linefeed in xsl:fo with FOP

    Matthias, Aug 8, 2006, in forum: XML
    Replies:
    0
    Views:
    881
    Matthias
    Aug 8, 2006
  5. Tor Inge Rislaa

    DataList removes the linefeed

    Tor Inge Rislaa, Nov 8, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    319
    Marina Levit [MVP]
    Nov 8, 2006
Loading...

Share This Page