- This topic is empty.
September 26, 2011 at 1:58 am #34507
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.
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.September 26, 2011 at 2:04 am #87937cayoub88Member
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.
CharbsSeptember 26, 2011 at 2:17 am #87939
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.September 26, 2011 at 5:44 am #87953
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?
September 26, 2011 at 3:54 pm #87992ArdeParticipant
- The forum ‘CSS’ is closed to new topics and replies.