Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS HTML/CSS Help – Hopefully Simple

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34507
    zild1221
    Member

    Hey,

    I am working on a little sim racing league website. I know little to nothing about web development really. I can usually piece something together from code snippets I find but this time I can’t.

    For the entry page to my site, I want two large image buttons. Each directing to their own page. I have the basic image size and look complete. I am trying to center them vertically and horizontally based on a fluid page for whatever res viewers are using. I can align one of the images horizontally and vertically centered, but I cannot get the two images to align in relation to each other. I am trying to get them side by side with a few pixel gap in between the two. Anyway, here is the sloppy code I have so far and a link to the test page.

    
    "http://www.w3.org/TR/html4/strict.dtd">


    test












    http://leagues.simrigs.com/

    They are going to look better than that and have a roll-over effect. First though I have to figure this out. I appreciate any help.

    #87937
    cayoub88
    Member

    Hi there,

    try this:









    You want to have both images in one div if you want to align both next to each other. Then you control #container and align it horizontally and vertically.
    And also important tip, in HTML, when you use an ID, it is intended to be unique, so you can only use it once on that page (i noticed in your code you had used #container twice). If you need to use the same code, then switch it to a class, which you can use as many times (.container) :)

    Hope that helps.
    Charbs

    #87939
    zild1221
    Member

    Well, I replaced that snippet of code. Now, if you look at the site again, it aligns very oddly. How do I go about fixing this now? I kind of expected it to overlay one picture over the other perfectly. For some reason though, it is overlapping only slightly.

    #87953
    zild1221
    Member

    Hmmm, I was just messing with stuff for quite a while. I came up with a ghetto way of doing this, however, from what I can find most people do not suggest doing it this way. Can you guys help me do this a better way?

    
    "http://www.w3.org/TR/html4/strict.dtd">


    test












    http://leagues.simrigs.com/

    #87992
    Arde
    Participant

    Hi

    Try this:

    
    "http://www.w3.org/TR/html4/strict.dtd">


    test









Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.