PDA

View Full Version : Coding Help



Mr-Trainor
13-04-2009, 06:42 PM
Ok, so I'm learning how to code (lol :P). I've started off with a simple Habbo-content box (expandable) which can be seen here:
~ http://www.clubpixels.co.uk/mr-trainor/content/box1/content.html (http://www.clubpixels.co.uk/mr-trainor/content/box1/content.html)

As you can see, the text from the top line (not the content box title), goes in to the border. How would I go about preventing this from happening? Might sound like a stupid question :P

Also, if there's any tutorials on how to code layouts with a content box in the middle and then more too the sides, hopefully you know what I mean :P, then I would appreciate links :)

+rep if you help,
Mr-Trainor.

Mr-Trainor
13-04-2009, 09:52 PM
Someone help pls.
Would I have to slice of the sides and make them seperate images? Because that wasn't in the tut :P

Cushioned
14-04-2009, 03:26 AM
You'd have to add side padding to the css of the side image.

padding-left: #px;
padding-right: #px;

OR

You could use short-hand padding
padding: 0px; #px; 0px; #px;
Clockwise starting at top.
I find doing each side is easiest, as it is easier to read in the end.

Blob
14-04-2009, 09:44 AM
padding: 5px;
then reduce the width by 10px; (for firefox)

Mr-Trainor
14-04-2009, 10:22 AM
You'd have to add side padding to the css of the side image.

padding-left: #px;
padding-right: #px;

OR

You could use short-hand padding
padding: 0px; #px; 0px; #px;
Clockwise starting at top.
I find doing each side is easiest, as it is easier to read in the end.

Thanks alot :)
(I used 1st one as well).


padding: 5px;
then reduce the width by 10px; (for firefox)

This one added padding round all 4 sides so I used the method above instead :)

+rep to both of you.

edit: cant give rep to any of you because ive recently given it too you :P

Blob
14-04-2009, 10:25 AM
Thanks alot :)
(I used 1st one as well).



This one added padding round all 4 sides so I used the method above instead :)

+rep to both of you.

edit: cant give rep to any of you because ive recently given it too you :P

Yeah, thats what its supposed to do, so its not at the sides and not stuck to the top aswell.

Want to hide these adverts? Register an account for free!