#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0

    Urgent help css background image


    i am making a website for my college project in c# vs 2010 , in login page css back ground image is not loading but when i log in to welcome page after entering password the bg image loads in welcome page and when i press back button of browser then there also it load, so my problm is that how to load bg image at login page before log in,i.e. when i open the website......please help...
  2. #2
  3. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    it sounds like the element that has a background image doesn't exist before logging in. You might want to add that element or assign the background image to an element that does exist on both pages for example:
    Code:
    body{background:url('../images/background.jpg') no-repeat 50% 50%}
    Or it the image you speak about is not a (literal) background image at all and just part of the content like so
    Code:
    <img src="images/background.jpg" alt="" />
    in that case also just add that element to the page before logging in.
    Last edited by aeternus; March 1st, 2013 at 08:34 AM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0
    Originally Posted by aeternus
    it sounds like the element that has a background image doesn't exist before logging in. You might want to add that element or assign the background image to an element that does exist on both pages for example:
    Code:
    body{background:url('../images/background.jpg') no-repeat 50% 50%}
    Or it the image you speak about is not a (literal) background image at all and just part of the content like so
    Code:
    <img src="images/background.jpg" alt="" />
    in that case also just add that element to the page before logging in.
    First Of all thank you for reply,,,, but my problem is still as it is , i tried both ur methods... and the basic code in both the page is same, and image path is also correct ir loads in 2nd page but not in 1st before logging, but loads in 1st also after log in......some small thing iss missing,,,
  6. #4
  7. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    First Of all thank you for reply,,,, but my problem is still as it is , i tried both ur methods... and the basic code in both the page is same, and image path is also correct ir loads in 2nd page but not in 1st before logging, but loads in 1st also after log in......some small thing iss missing,,,
    You're very welcome!

    But what is really missing is either your code (post it) or a link with login credentials so people can help more specifically.
    Last edited by aeternus; March 2nd, 2013 at 12:15 PM.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0
    Originally Posted by aeternus
    You're very welcome!

    But what is really missing is either your code (post it) or a link with login credentials so people can help more specifically.
    imagebam.com/image/bc80db240706166 this web add. of code plz enter ww in beggening
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    4
    Rep Power
    0
    the above is the code of css style sheet of log in page and same is for welcome page ,but welcome page is imlemented by master page...
  12. #7
  13. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    Ok, as you can see in your css there is a class of .style1 that has this background image. But if you read the sticky we require some html because as you know html & css are pretty much bound to each other.

    if you open up the source before logging in (right click view source) try to find (crtl+f) .style1

    The problem with this thread we can help you unless you give us something to actually work with (not going to ask again). It could very well be, that the element before logging in doesn't exist, is behind another element, is overwritten, has some weird margin showing up outside the page.

    Without HTML & CSS we can't help. Ideally I would compare the logged in page against the normal page. You now at least know what to look for (.style1)

IMN logo majestic logo threadwatch logo seochat tools logo