CSS help, PLEASE. - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36) +---- Forum: Website Development (https://www.supportforums.net/forumdisplay.php?fid=43) +---- Thread: CSS help, PLEASE. (/showthread.php?tid=3416) |
CSS help, PLEASE. - Elektrisk - 12-08-2009 This is seriously fuckin|g my brains! I simply want to create a <div> to create a right sidebar. Whenever I set the margins to position it to the right of .mainContent (where lorem ipsum is), it always affects the mainContent <div>. HOW on earth can I set it so it doesn't effect the maincontent <div>. Here's a screenshot. I'd like a <div> to the RIGHT of maincontent, to create a sidebar affect. Here's the entire coding. I'm a total beginner, so if it looks jumbled, forgive me. http://i46.tinypic.com/14ub7d5.jpg Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> RE: CSS help, PLEASE. - Omniscient - 12-08-2009 Did you use the W3C validator to make sure your code is correct? RE: CSS help, PLEASE. - Gaijin - 12-08-2009 position attribute may be the answer. position:relative; or position:absolute; also instead of margins I would say use top: and left: RE: CSS help, PLEASE. - Elektrisk - 12-08-2009 Quote: Did you use the W3C validator to make sure your code is correct? I just did. The only error found was that I didn't specify the alt attribute in the img tag, which I doubt is related to my issue. @NinjaGeek, Thanks! Using position: absolute and using top/left worked. You're a lifesaver. Looks like I have a lot more to learn This thread can be closed. |