- This topic is empty.
-
AuthorPosts
-
September 26, 2011 at 1:58 am #34507
zild1221
MemberHey,
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
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 #87937cayoub88
MemberHi 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.
CharbsSeptember 26, 2011 at 2:17 am #87939zild1221
MemberWell, 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 #87953zild1221
MemberHmmm, 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
September 26, 2011 at 3:54 pm #87992Arde
Participant -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.