robzilla

msg:4428962 | 9:42 am on Mar 14, 2012 (gmt 0) |
Somebody correct me if I'm wrong, but I believe a#login_logo {} should be written as #login_logo a {}. In this case, however, you have connected #login_logo to the <a> element, so you can simply declare #login_logo in your stylesheet, without the anchor reference.
|
rocknbil

msg:4429080 | 3:59 pm on Mar 14, 2012 (gmt 0) |
Well, your last suggestion would (should, see below) work but #login_logo a refers to an anchor inside the element #login_logo - #login_logo is the ID'ed element. a#login_logo is correct too. Look: <a href="" id="login_logo"> If you classed it, <a href="" class="login_logo"> this would look more common a.login_logo Bottom line is unless you have another element ID'ed as login_logo (which you absolutely shouldn't, id's need to be unique, that's what makes them ID's) this should also work. #login_logo {} They probably did that because there's other anchors being styled inside the parent container and needed to specify a#[the id]. Returning to the problem: there's a couple things going on. You say "background image" but have in inline image specified: <a href=""><img></a> Is that the image you're referring to? Is it because the logo used in the img tag is larger than the container holding it? a#login_logo{ position: absolute; top: 0; left: 404px; height: 129px; margin: 0 auto; width: 192px; } Also, anchors are inline elements by default, I don't see where the block property is added, but it should work out if you use an inline image. The anchor element itself just won't actually wrap around the logo and will only have the height of whatever font settings are on this element (use the FireFox Firebux extension to see this effect.)
|
lucy24

msg:4429165 | 6:59 pm on Mar 14, 2012 (gmt 0) |
I don't see any reference to a background in your CSS at all. It should say something like: background-image: no-repeat center url(blahblah). Either you've left out a piece-- from the post or from the css itself-- or you're calling something a background that isn't a background.
|
Scotty13

msg:4429223 | 9:47 pm on Mar 14, 2012 (gmt 0) |
Thank you BOTH so much. This is my entry and everything is perfect. /* login */ #container_login{ font-family: Arial, sans-serif; font-size: 12px; margin: 0 auto; overflow: hidden; position: relative; max-width: 100%; height: 825px; } #login_logo{ position: absolute; top: 0; height: 803px; margin: 0 auto; width: 1306px; } .
|
rocknbil

msg:4429610 | 4:29 pm on Mar 15, 2012 (gmt 0) |
So I'm guessing it was the container being too narrow. cool. :-P
|
devangan

msg:4430838 | 1:31 pm on Mar 19, 2012 (gmt 0) |
1 thing remember we can't use margin:0 auto; with position:absolute.
|
hoangvu

msg:4439910 | 7:50 am on Apr 12, 2012 (gmt 0) |
let try background : url (your_image_link) center top; for center background
|
Scotty13

msg:4439946 | 9:42 am on Apr 12, 2012 (gmt 0) |
Got it! Thank you, hoangvu
|
|