center two inline elements

Discussion in 'HTML' started by Lanmind, Sep 13, 2008.

  1. Lanmind

    Lanmind Guest

    Hello all,

    Quick question, is it possible to center two inline elements next to
    each other inside a block level element?

    I have an input text box and input submit button next to each other
    inside a <div>, I would like to have both elements next to each other
    but still centered inside the <div>.

    The elements have id's "text" and "submit" and the <div>'s id is
    "main_search".

    Here is my page and CSS:

    http://www.dockhawk.com/default_test.html

    http://www.dockhawk.com/default_test.css

    Thanks all.
    Lanmind, Sep 13, 2008
    #1
    1. Advertising

  2. Lanmind

    dorayme Guest

    In article
    <>,
    Lanmind <> wrote:

    > Hello all,
    >
    > Quick question, is it possible to center two inline elements next to
    > each other inside a block level element?
    >
    > I have an input text box and input submit button next to each other
    > inside a <div>, I would like to have both elements next to each other
    > but still centered inside the <div>.
    >
    > The elements have id's "text" and "submit" and the <div>'s id is
    > "main_search".
    >
    > Here is my page and CSS:
    >
    > http://www.dockhawk.com/default_test.html
    >
    > http://www.dockhawk.com/default_test.css
    >
    > Thanks all.


    Please consider that by giving out a URL with Google map on your page,
    *without* letting people know what they are in for download wise, they
    might well find you have caused them to unwillingly use up their
    bandwidth. Some people have tight limits and have to pay...

    --
    dorayme
    dorayme, Sep 13, 2008
    #2
    1. Advertising

  3. Lanmind

    Lanmind Guest

    On Sep 12, 10:20 pm, dorayme <> wrote:
    > In article
    > <>,
    >
    >
    >
    >  Lanmind <> wrote:
    > > Hello all,

    >
    > > Quick question, is it possible to center two inline elements next to
    > > each other inside a block level element?

    >
    > > I have an input text box and input submit button next to each other
    > > inside a <div>, I would like to have both elements next to each other
    > > but still centered inside the <div>.

    >
    > > The elements have id's "text" and "submit" and the <div>'s id is
    > > "main_search".

    >
    > > Here is my page and CSS:

    >
    > >http://www.dockhawk.com/default_test.html

    >
    > >http://www.dockhawk.com/default_test.css

    >
    > > Thanks all.

    >
    > Please consider that by giving out a URL with Google map on your page,
    > *without* letting people know what they are in for download wise, they
    > might well find you have caused them to unwillingly use up their
    > bandwidth. Some people have tight limits and have to pay...
    >
    > --
    > dorayme


    Hi dorayme,

    I'm sorry I didn't think Google Maps would be such an issue.So some
    people would be upset if they accidentally stumbled upon the Google
    Maps homepage?

    What kind of limitations? The only limitations I have heard of were
    Comcast's new 600 GB limit but that's huge of course. I will do in the
    future though.
    Lanmind, Sep 13, 2008
    #3
  4. Lanmind

    dorayme Guest

    In article
    <>,
    Lanmind <> wrote:

    > On Sep 12, 10:20 pm, dorayme <> wrote:
    > > In article
    > > <>,
    > >
    > >
    > >
    > >  Lanmind <> wrote:
    > > > Hello all,

    > >
    > > > Quick question, is it possible to center two inline elements next to
    > > > each other inside a block level element?

    > >
    > > > I have an input text box and input submit button next to each other
    > > > inside a <div>, I would like to have both elements next to each other
    > > > but still centered inside the <div>.

    > >
    > > > The elements have id's "text" and "submit" and the <div>'s id is
    > > > "main_search".

    > >
    > > > Here is my page and CSS:

    > >
    > > >http://www.dockhawk.com/default_test.html

    > >
    > > >http://www.dockhawk.com/default_test.css

    > >
    > > > Thanks all.

    > >
    > > Please consider that by giving out a URL with Google map on your page,
    > > *without* letting people know what they are in for download wise, they
    > > might well find you have caused them to unwillingly use up their
    > > bandwidth. Some people have tight limits and have to pay...
    > >
    > > --
    > > dorayme

    >
    > Hi dorayme,
    >
    > I'm sorry I didn't think Google Maps would be such an issue.So some
    > people would be upset if they accidentally stumbled upon the Google
    > Maps homepage?
    >
    > What kind of limitations? The only limitations I have heard of were
    > Comcast's new 600 GB limit but that's huge of course. I will do in the
    > future though.


    Simple thing really, in my case I have a plan that gives me a lot more
    at some times of the day and night than at other times and it is
    important for me to not use up my lot for business reasons. I can
    usually kill a slow loading url but sometimes the browser ignores my
    attempts for a while, like a dog who knows he has been told not to catch
    and tease the neighbour's cat but who nevertheless pretends not to hear
    the owner's frantic calls for a while... just enough a while to get an
    amount of sadistic hunting pleasure for himself without bringing down
    too severe an admonition. He knows how far he can push things. It takes
    me time to kill a browser through the ultimate Option Command Escape in
    Mac OS X when oher techniques fail.

    Have you got a simple test case without google map?

    --
    dorayme
    dorayme, Sep 13, 2008
    #4
  5. Lanmind

    Lanmind Guest

    On Sep 12, 11:05 pm, dorayme <> wrote:
    > In article
    > <>,
    >
    >
    >
    >  Lanmind <> wrote:
    > > On Sep 12, 10:20 pm, dorayme <> wrote:
    > > > In article
    > > > <>,

    >
    > > >  Lanmind <> wrote:
    > > > > Hello all,

    >
    > > > > Quick question, is it possible to center two inline elements next to
    > > > > each other inside a block level element?

    >
    > > > > I have an input text box and input submit button next to each other
    > > > > inside a <div>, I would like to have both elements next to each other
    > > > > but still centered inside the <div>.

    >
    > > > > The elements have id's "text" and "submit" and the <div>'s id is
    > > > > "main_search".

    >
    > > > > Here is my page and CSS:

    >
    > > > >http://www.dockhawk.com/default_test.html

    >
    > > > >http://www.dockhawk.com/default_test.css

    >
    > > > > Thanks all.

    >
    > > > Please consider that by giving out a URL with Google map on your page,
    > > > *without* letting people know what they are in for download wise, they
    > > > might well find you have caused them to unwillingly use up their
    > > > bandwidth. Some people have tight limits and have to pay...

    >
    > > > --
    > > > dorayme

    >
    > > Hi dorayme,

    >
    > > I'm sorry I didn't think Google Maps would be such an issue.So some
    > > people would be upset if they accidentally stumbled upon the Google
    > > Maps homepage?

    >
    > > What kind of limitations? The only limitations I have heard of were
    > > Comcast's new 600 GB limit but that's huge of course. I will do in the
    > > future though.

    >
    > Simple thing really, in my case I have a plan that gives me a lot more
    > at some times of the day and night than at other times and it is
    > important for me to not use up my lot for business reasons. I can
    > usually kill a slow loading url but sometimes the browser ignores my
    > attempts for a while, like a dog who knows he has been told not to catch
    > and tease the neighbour's cat but who nevertheless pretends not to hear
    > the owner's frantic calls for a while... just enough a while to get an
    > amount of sadistic hunting pleasure for himself without bringing down
    > too severe an admonition. He knows how far he can push things. It takes
    > me time to kill a browser through the ultimate Option Command Escape in
    > Mac OS X when oher techniques fail.
    >
    > Have you got a simple test case without google map?
    >
    > --
    > dorayme


    Yes dorayme I do, here is the page and CSS:

    http://www.dockhawk.com/default_test_nomap.html

    http://www.dockhawk.com/default_test.css

    Thank you
    Lanmind, Sep 13, 2008
    #5
  6. richard wrote:

    > Idiot.


    On Usenet, it is common practice to separate the sig by putting a line with
    "-- " before it. This way:

    --
    Yucca
    Jukka K. Korpela, Sep 13, 2008
    #6
  7. Lanmind wrote:
    > On Sep 12, 11:05 pm, dorayme <> wrote:
    >> In article
    >> <>,
    >>
    >>
    >>
    >> Lanmind <> wrote:
    >>> On Sep 12, 10:20 pm, dorayme <> wrote:
    >>>> In article
    >>>> <>,

    >>
    >>>> Lanmind <> wrote:
    >>>>> Hello all,

    >>
    >>>>> Quick question, is it possible to center two inline elements next
    >>>>> to each other inside a block level element?

    >>
    >>>>> I have an input text box and input submit button next to each
    >>>>> other inside a <div>, I would like to have both elements next to
    >>>>> each other but still centered inside the <div>.

    >>
    >>>>> The elements have id's "text" and "submit" and the <div>'s id is
    >>>>> "main_search".

    >>
    >>>>> Here is my page and CSS:

    >>
    >>>>> http://www.dockhawk.com/default_test.html

    >>
    >>>>> http://www.dockhawk.com/default_test.css

    >>
    >>>>> Thanks all.

    >>
    >>>> Please consider that by giving out a URL with Google map on your
    >>>> page, *without* letting people know what they are in for download
    >>>> wise, they might well find you have caused them to unwillingly use
    >>>> up their bandwidth. Some people have tight limits and have to
    >>>> pay...

    >>
    >>>> --
    >>>> dorayme

    >>
    >>> Hi dorayme,

    >>
    >>> I'm sorry I didn't think Google Maps would be such an issue.So some
    >>> people would be upset if they accidentally stumbled upon the Google
    >>> Maps homepage?

    >>
    >>> What kind of limitations? The only limitations I have heard of were
    >>> Comcast's new 600 GB limit but that's huge of course. I will do in
    >>> the future though.

    >>
    >> Simple thing really, in my case I have a plan that gives me a lot
    >> more at some times of the day and night than at other times and it is
    >> important for me to not use up my lot for business reasons. I can
    >> usually kill a slow loading url but sometimes the browser ignores my
    >> attempts for a while, like a dog who knows he has been told not to
    >> catch and tease the neighbour's cat but who nevertheless pretends
    >> not to hear the owner's frantic calls for a while... just enough a
    >> while to get an amount of sadistic hunting pleasure for himself
    >> without bringing down too severe an admonition. He knows how far he
    >> can push things. It takes me time to kill a browser through the
    >> ultimate Option Command Escape in Mac OS X when oher techniques fail.
    >>
    >> Have you got a simple test case without google map?
    >>
    >> --
    >> dorayme

    >
    > Yes dorayme I do, here is the page and CSS:


    At this point, I lost interest.

    Consider learning how to post to Usenet. To get constructive help, post
    constructively.

    --
    Yucca
    Jukka K. Korpela, Sep 13, 2008
    #7
  8. Lanmind

    Roy A. Guest

    On 13 Sep, 07:20, dorayme <> wrote:
    > In article
    > <>,
    >
    >  Lanmind <> wrote:
    > > Hello all,

    >
    > > Quick question, is it possible to center two inline elements next to
    > > each other inside a block level element?

    >
    > > I have an input text box and input submit button next to each other
    > > inside a <div>, I would like to have both elements next to each other
    > > but still centered inside the <div>.

    >
    > > The elements have id's "text" and "submit" and the <div>'s id is
    > > "main_search".

    >
    > > Here is my page and CSS:

    >
    > >http://www.dockhawk.com/default_test.html

    >
    > >http://www.dockhawk.com/default_test.css

    >
    > > Thanks all.

    >
    > Please consider that by giving out a URL with Google map on your page,
    > *without* letting people know what they are in for download wise, they
    > might well find you have caused them to unwillingly use up their
    > bandwidth. Some people have tight limits and have to pay...


    If you're using IE, you go to: Tools, Internet Options, Advanced,
    Multimedia and disable "Show images".

    If you're using Safari, you could go to Safari, Preferences,
    Appearance and disable "Display images when the page opens".

    If you're using Firefox, well isn't there several add-ons? You could
    try ImgLikeOpera:

    "ImgLikeOpera allows load only the images that you want in Firefox
    browser. This extension is very useful for non broadband users..."

    Warning: The following link might contain images:
    https://addons.mozilla.org/en-US/firefox/search?q=images&cat=all

    --
    Another idiot
    Roy A., Sep 13, 2008
    #8
  9. Lanmind

    Roy A. Guest

    On 13 Sep, 06:48, Lanmind <> wrote:
    > Hello all,
    >
    > Quick question, is it possible to center two inline elements next to
    > each other inside a block level element?
    >
    > I have an input text box and input submit button next to each other
    > inside a <div>, I would like to have both elements next to each other
    > but still centered inside the <div>.


    div { text-align: center }

    > The elements have id's "text" and "submit" and the <div>'s id is
    > "main_search".
    >
    > Here is my page and CSS:
    >
    > http://www.dockhawk.com/default_test.html


    Try to use a stripped down test case.

    > http://www.dockhawk.com/default_test.css


    #main_search {
    [...]
    /*width: 496px;*/
    text-align: center;
    [...]
    }
    Roy A., Sep 13, 2008
    #9
  10. Lanmind

    Lanmind Guest

    On Sep 13, 7:45 am, "Roy A." <> wrote:
    > On 13 Sep, 06:48, Lanmind <> wrote:
    >
    > > Hello all,

    >
    > > Quick question, is it possible to center two inline elements next to
    > > each other inside a block level element?

    >
    > > I have an input text box and input submit button next to each other
    > > inside a <div>, I would like to have both elements next to each other
    > > but still centered inside the <div>.

    >
    > div { text-align: center }
    >
    > > The elements have id's "text" and "submit" and the <div>'s id is
    > > "main_search".

    >
    > > Here is my page and CSS:

    >
    > >http://www.dockhawk.com/default_test.html

    >
    > Try to use a stripped down test case.
    >
    > >http://www.dockhawk.com/default_test.css

    >
    > #main_search {
    > [...]
    > /*width: 496px;*/
    > text-align: center;
    > [...]
    >
    > }


    Thanks Roy,

    I've done the text align: center; but I have some worries about that.
    I'm not positive where I heard it but I thought text-align should be
    used for only text and images.

    I'm worried it might cause problems on some browsers or displays of
    different resolutions. This is why I hadn't done that, it seems to be
    ok now though so...Thanks.
    Lanmind, Sep 13, 2008
    #10
  11. Lanmind

    dorayme Guest

    In article
    <>,
    "Roy A." <> wrote:

    > On 13 Sep, 07:20, dorayme <> wrote:
    > > In article
    > > <>,
    > >
    > >  Lanmind <> wrote:
    > >
    > > >http://www.dockhawk.com/default_test.html

    > >
    > > Please consider that by giving out a URL with Google map on your page,
    > > *without* letting people know what they are in for download wise, they
    > > might well find you have caused them to unwillingly use up their
    > > bandwidth. Some people have tight limits and have to pay...

    >
    > If you're using IE, you go to: Tools, ...
    >

    [...advice on how to turn a lot of the world off...]

    > Warning: The following link might contain images:
    > https://addons.mozilla.org/en-US/firefox/search?q=images&cat=all
    >


    Thanks for telling Grandma Dorayme how to suck eggs, I would find it
    very inconvenient to do most of the above. <g>

    But I liked your last paragraph's warning. That is what really needs
    stressing.

    Anyway, Lanmind was very nice about it and I will see if I can help
    him...

    --
    dorayme
    dorayme, Sep 13, 2008
    #11
  12. Lanmind

    Roy A. Guest

    On 13 Sep, 21:42, Lanmind <> wrote:
    > On Sep 13, 7:45 am, "Roy A." <> wrote:
    >
    > I've done the text align: center; but I have some worries about that.
    > I'm not positive where I heard it but I thought text-align should be
    > used for only text and images.


    The text-align property alignes text and text level (inline) elements.
    In quirk mode it aligns the table element. That isn't correct and
    don't work in standards mode. To align block level elements, you use
    margins, like you did.

    > I'm worried it might cause problems on some browsers or displays of
    > different resolutions.


    In small displays, the content is wrapped like text.

    BTW, I don't think it is wise to have 'overflow: hidden' on the html
    and body element. That's not helping, it just make things
    inaccessible. Design to support the content, not to hide it.
    Roy A., Sep 14, 2008
    #12
  13. Lanmind

    Roy A. Guest

    On 13 Sep, 23:21, dorayme <> wrote:
    > In article
    > <>,
    >  "Roy A." <> wrote:
    >
    > > On 13 Sep, 07:20, dorayme <> wrote:
    > > > In article
    > > > <>,

    >
    > > >  Lanmind <> wrote:

    >
    > > > >http://www.dockhawk.com/default_test.html

    >
    > > > Please consider that by giving out a URL with Google map on your page,
    > > > *without* letting people know what they are in for download wise, they
    > > > might well find you have caused them to unwillingly use up their
    > > > bandwidth. Some people have tight limits and have to pay...

    >
    > > If you're using IE, you go to: Tools, ...

    >
    > [...advice on how to turn a lot of the world off...]
    >
    > > Warning: The following link might contain images:
    > >https://addons.mozilla.org/en-US/firefox/search?q=images&cat=all

    >
    > Thanks for telling Grandma Dorayme how to suck eggs, I would find it
    > very inconvenient to do most of the above. <g>


    I can see that. Has Google Chrome taken away the back button too?

    > But I liked your last paragraph's warning. That is what really needs
    > stressing.


    I forget that some people have to pay for their bandwidth, even when
    just surfing. But, if it is possible to find a way without being
    ridiculous, that
    would be nice. I guess, if my page uses more bandwidth than what's
    normal, it would be appropriate to mark it.

    Would it help if my domain name ended with a warning like "no"?
    Roy A., Sep 14, 2008
    #13
  14. Lanmind

    dorayme Guest

    In article
    <>,
    "Roy A." <> wrote:

    > Would it help if my domain name ended with a warning like "no"?


    I have no idea about your domain? Have I had any trouble with it? I get
    on very well with most domains. I'm sure I would have little trouble
    with yours, you seem a sensible fellow... Stop worrying so much. <g>

    --
    dorayme
    dorayme, Sep 14, 2008
    #14
    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. Abhi
    Replies:
    2
    Views:
    734
    E. Robert Tisdale
    Jul 3, 2003
  2. Alvin
    Replies:
    7
    Views:
    473
    E. Robert Tisdale
    May 6, 2005
  3. Replies:
    3
    Views:
    456
  4. Daniel Vallstrom
    Replies:
    2
    Views:
    1,867
    Kevin Bracey
    Nov 21, 2003
  5. Nish
    Replies:
    4
    Views:
    484
    Thomas Stegen
    Oct 8, 2004
Loading...

Share This Page