Help
Search
Login
Register
Home
Forum: web design and graphics community
Celestial Star Forum
>
Web Development
>
Coding
>
Padding Stuff
Pages: [
1
]
« previous
next »
Print
Author
Topic: Padding Stuff (Read 418 times)
English Rose
Incubus
Posts: 51
Padding Stuff
«
on:
July 18, 2007, 06:27:14 AM »
I have a little layout coding problem. It seems to happen randomly, so I'm a little confused.
I LOVE tables. But sometimes when I code them, they seem to muck up. Whenever I add any padding to the background, the whole background shoves that way. For example, if I have padding-left of 5px, the right side of the background moves to the left 5px.
Is it maybe the file attachment? Should I not use .png images?
Here's the code:
Code:
<TR>
<TD ROWSPAN="1" COLSPAN="1" WIDTH="239" STYLE="background: url(images/[image].png) no-repeat; padding-right:10px;" valign="top">
Content
</TD>
<TD ROWSPAN="1" COLSPAN="1" WIDTH="561" STYLE="background: url(images/[image].png) no-repeat; padding-left:20px;" valign="top">
content
</TD></TR>
FYI, the layout is 800x500. I've checked the image sizes too.
Thanks! :D
Logged
Ash Fohx
Skogul
Posts: 43
Re: Padding Stuff
«
Reply #1 on:
July 18, 2007, 11:19:10 AM »
One thing I always do when using background images is specify the position of the background in the CSS. For instance, in the first cell in the code you provided, I would've made it
Code:
<TD ROWSPAN="1" COLSPAN="1" WIDTH="239" STYLE="background: url(images/[image].png) top left no-repeat; padding-right:10px;" valign="top">
Content
</TD>
I only do this because the position of the background in Firefox/Netscape and IE is slightly different and this can muck up repeating backgrounds, but doing this should fix your problem since it forces the background into the top left-hand corner. I'm not positive it'll work but it's worth a shot. I've never had your problem before but it's also been sometime I've since I've last coded a table layout, so I hope it works out. ^^
Logged
Killer siggy courtesy of Sutorei-chan~<3
Friendly discussion forums for all sorts of topics~
English Rose
Incubus
Posts: 51
Re: Padding Stuff
«
Reply #2 on:
July 20, 2007, 02:31:38 AM »
Thanks for the reply.
I gave it a try, but it doesn't seem to have worked. I must be doing SOMETHING wrong, I just can't see it! XD
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General
=> New Members
=> Announcements
=> Support / Suggestions
-----------------------------
Contests
-----------------------------
=> Archive
===> Contests
===> Blend Challenges
===> SOTW
-----------------------------
Art Boards
-----------------------------
=> Creative mediums
=> Requests & offers
=> Tutorials
===> Celestial Star Tutorials
-----------------------------
Web Development
-----------------------------
=> Coding
=> Web Design
=> Advertisements / Affiliation
-----------------------------
Off-topic
-----------------------------
=> Entertainment
-----------------------------
Español (Spanish Only)
-----------------------------
=> General / Bienvenida
=> Anuncios / Ayuda
=> Código / Desarrollo web
Welcome,
Guest
Members login
Register for free
General
General
New members
Announcements
Support / Suggestions
Art boards
Creative mediums
Requests and offers
Tutorials
Celestial Star tutorials
Web development
Coding
Web design
Advertisements / affiliation
Off-topic
The non-sense
Ententainment
Loading...