Jump to content

-pollux-

Members
  • Posts

    3
  • Joined

  • Last visited

Previous Fields

  • Languages
    English, Spanish

Profile Information

  • Location
    Madrid, Spain

-pollux-'s Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Actually, I'm afraid it's not solved... The height is correctly displayed and when you scroll down everything looks ok, but if you need to scroll right or left the div changes its position. Here's the code I'm working with right now. <body style="margin: 0; padding: 0px"><div style="width: 1200px; margin: 0 auto; padding-bottom:50px"> <div style="background-color: #CFC; width: 340px; position:fixed; margin-left: 20px; top:0px; bottom:0px"></div> <div style="background-color: #CCC; width: 340px; height: 395px; position: absolute; margin-left: 20px; top: 0px"></div> <div style="box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.8); margin-top: 60px"> <div style="background-color: #FFF; width: 1200px; height: 260px"></div> <div style="background-color: #666; width: 1200px; height: 26px"></div> <div style="background-color: #FFF; width: 1200px; min-height: 500px"></div> </div></div></body> The height problem is solved by having the div fixed and using top:0 and bottom:0. However, it will anchor to the browser window if you scroll from side to side. So again... any help is appreciated.
  2. If you want to center anything, just add margin: 0 auto and you should have it centered.
  3. Hi there. I'be been doing a very simple web recently in which I'd like to have a little green div at the right side and with some sort of a bookmark look. The code I've been using is <style type="text/css">html, body {margin: 0px;height: 100%;font-family: Arial, Helvetica, sans-serif;}</style> <div style="width:1200px; height:100%; margin:0 auto; position:relative"> <!-- Logo --> <div style="width:340px; height:395px; left:20px; position:absolute; z-index:3; background-color:#FFF; box-shadow:0px 0px 15px rgba(0, 0, 0, 0.8); text-align:center"></div> <!-- Green bg --> <div style="width:340px; height:100%; position:relative; left:20px; z-index:2; background:#D1E0BA"></div> <!-- Container and shadow --> <div style="box-shadow:0px 0px 15px rgba(0, 0, 0, 0.8); position:absolute; top:60px"> <!-- Images --> <div style="width:1200px; height:260px; background:#FFF"></div> <!-- Menu --> <div style="width:1200px; height:26px; padding: 9px 0 0; background:#999999; overflow:hidden"></div> <!-- Text --> <div style="width:740px; background-color:#FFF; padding: 50px 50px 50px 410px; text-align:justify"> </div> </div></div> Right now, the green bg looks right only if the total document is not longer than the browser window. If it's longer, there is a blank space at the bottom of it. I've tried do change it's position to fixed, but since everything is centered, it won't display correctly. If anybody could help, I'd greatly appreciate it. Thanks in advance!
×
×
  • Create New...