Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Centered vertical alignment of menu in top frame

Centered vertical alignment of menu in top frame

Scheduled Pinned Locked Moved Web Development
helpcssquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Erik Hammar
    wrote on last edited by
    #1

    Hello everybody! =) I have a rather irritating problem.. I'm designing a homepage with two frames. One top frame with some kind of a navigation menu in it, which I want to be centered vertically in the frame, no matter what text size is selected in IE/other browser. Can it be done with a simple selector or something in CSS, or do I have to use some dynamic coding to move it when the frame has loaded or something? :confused: Thanks for any help or suggestions! (as long it's not about removing the frames entirely ;)

    J M 2 Replies Last reply
    0
    • E Erik Hammar

      Hello everybody! =) I have a rather irritating problem.. I'm designing a homepage with two frames. One top frame with some kind of a navigation menu in it, which I want to be centered vertically in the frame, no matter what text size is selected in IE/other browser. Can it be done with a simple selector or something in CSS, or do I have to use some dynamic coding to move it when the frame has loaded or something? :confused: Thanks for any help or suggestions! (as long it's not about removing the frames entirely ;)

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      how about:

      <center><div align="center">My Menu Goes Here</div></center>

      What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

      E 1 Reply Last reply
      0
      • J John Kuhn

        how about:

        <center><div align="center">My Menu Goes Here</div></center>

        What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

        E Offline
        E Offline
        Erik Hammar
        wrote on last edited by
        #3

        I thought "horizontal" meant the <------------> direction..? :)

        J 1 Reply Last reply
        0
        • E Erik Hammar

          Hello everybody! =) I have a rather irritating problem.. I'm designing a homepage with two frames. One top frame with some kind of a navigation menu in it, which I want to be centered vertically in the frame, no matter what text size is selected in IE/other browser. Can it be done with a simple selector or something in CSS, or do I have to use some dynamic coding to move it when the frame has loaded or something? :confused: Thanks for any help or suggestions! (as long it's not about removing the frames entirely ;)

          M Offline
          M Offline
          matthias s 0
          wrote on last edited by
          #4

          As far as I'm concerned you HTML does not provide for vertical alignment (in accordance to the HTML 4 spec at least). But what you can try is either build a frameset into the menu frame, where you place 3 rows like and specify the sizes like this: rows="*,15,*". Then the two "buffer" frames will ensure that your middle frame is displayed vertically centered. If you don't want to mess around with frames, you can try it in a table, but you'll get problems getting this x-browser ready. I've done it a couple of times but IE on Mac always screws it up. As height for the top and bottom table row (the buffers) provide a "*". But I've warned you, this works only it a couple of browsers ;P HTH Matthias

          If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs. (Lounge/David Wulff)

          www.emvoid.de

          1 Reply Last reply
          0
          • E Erik Hammar

            I thought "horizontal" meant the <------------> direction..? :)

            J Offline
            J Offline
            John Kuhn
            wrote on last edited by
            #5

            :-O ooops. me not read english too good no more.... Vertical, you say? How 'bout a table with height="100%" then? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups