February 27, 201214 yr Hi guys! I'm sure you've heard this old before, but I was wondering is anyone can give me some advice. I'm working on a webpage for a uni project, but I can't get my faux column to work. here is the CSS I have used: #rightcontentbar { width: 19%; color: #FFFFFF; background-color: #9999FF; padding: 0 0.5em 1.25em 0.5em; float: right; } #maincontent { width: 100%; background: url(leftcol.gif) repeat-y; overflow: hidden; padding: 0; } Am I missing something simple or huge? I've attached the files to look at. any tips would really be appreciated. I know it's a mess at the moment, but I've only just started. Please be gentle Edited February 27, 201214 yr by Izanami Please use the code button or tags to format your code.
February 27, 201214 yr YouWhat you're missing is code formatting in your post. I've fixed it for you this time, but for future reference it's this button on the editor: As far as troubleshooting goes, nobody wants to download your files to mess around with. Either host it somewhere or put your problem code into a JSFiddle.
February 27, 201214 yr Author YouWhat you're missing is code formatting in your post. I've fixed it for you this time, but for future reference it's this button on the editor: As far as troubleshooting goes, nobody wants to download your files to mess around with. Either host it somewhere or put your problem code into a JSFiddle. Sorry, I didn't know uploading files was frowned upon. Thanks
February 27, 201214 yr Sorry, I didn't know uploading files was frowned upon. Thanks It's not frowned upon, it's just much less likely to get a response because it's more hassle to help you. Edited February 27, 201214 yr by Renaissance-Design
February 27, 201214 yr Author It's not frowned upon, it's just much less likely to get a response because it's more hassle to help you. Here it is on jsfiddle: http://jsfiddle.net/Jocelyn2804/BDk3A/2/ I would appreciate any tips
February 27, 201214 yr Author What are you expecting to see, and what are you seeing? I have a right hand column, which I want to have the background colour #9999FF but I can't get it to work. Atm, I have just given the right column div the background colour, but I know that only spans the length of the column. I'm not sure if it's the dimensions of background image that's the issue or something else. Are background images affected by margin/ padding within the containing div?
February 27, 201214 yr I assume you're aiming for this? "Background" is a shorthand property - when using it you should specify the values for background-position and background-color as well as the others, even if background-color is transparent.
February 27, 201214 yr Author I assume you're aiming for this? "Background" is a shorthand property - when using it you should specify the values for background-position and background-color as well as the others, even if background-color is transparent. Does the column width have an effect? whether the width is specified in px or %?
February 27, 201214 yr It shouldn't have an effect at all, because you should be applying the background image to the columns' container.
February 27, 201214 yr Author It shouldn't have an effect at all, because you should be applying the background image to the columns' container. Still no luck, but I'll keep trying.
Create an account or sign in to comment