|
|||||||
| HTML Discussion and technical support for building, using and deploying HTML sites. |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with background/sidebars
Hi,
I just got into web design and my friend referred me to this site after not being able to resolve one of my problems, so I will probably be searching for answers on here pretty often from now on haha. But okay, I searched through posts here and couldn't find a solution (most likely because I don't really know what to call the problem). What I'm trying to do is create a site with a main portion in the center and two 'sidebars' I guess on the sides (more like a background) but I do not want them to expand or contract. I can't seem to find a way to keep them fixed in place. Here's an example of how I would like my page to be formatted: www.deadmau5.com. The sidebar area would be the gray parts on the far left and right. Thanks in advance and sorry if I've repeated a thread! Zach |
|
#2
|
||||
|
||||
|
Try using the CSS property, min-height: XXXpx;, on the content container you wish to fix to a set height. Or, look into the Min-Height Fast Hack.
Min-Height for Internet Explorer HundredPercentHeight There are other alternatives I image. |
|
#3
|
|||
|
|||
|
I'm not sure that fixes my problem. Notice how on the example website I posted, the grey bars on the sides disappear until only the main website is showing when you shrink the window size. That is what I am trying to achieve. I know there are templates to use that give a general gray background that does what I am looking for, but I cannot find how to place a picture on that to make it look nicer.
|
|
#4
|
||||
|
||||
|
This is easily accomplished. The main page should be within a <div> or <table> element, which has fixed dimensions. Then that element is centered on the page containing all the content etc. The background color or image for the page can then be the color/image of the sidebars. They will be equal in size and expand/contract depending on the window size.
__________________
Languages: PHP, Perl (including IO::Socket and Net::IRC), HTML, CSS, Javascript, C, C++, Visual C++, Java (for applets), and mIRC scripting language. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|