Jump to content


Few CSS questions


5 replies to this topic

#1 John Miller

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Location:Maryland, USA
  • Interests:web design, cars, music

Posted 02 October 2009 - 12:26 AM

Hey, I'm working on my website layout and getting this little issues i need fixed.

Now I'm viewing the site in fire fox and IE to make them as compatible as possible.

For some reason, padding for tables will not work in IE but works in Fire fox ;)

Code im using is:

.MainColumBoxes
{
width: 100%;
border: 1px #cacaca solid;
padding: 5px;
background-color: #ffffff;
}

Edited by John Miller, 02 October 2009 - 01:21 AM.


#2 ninja_girl

    Young Padawan

  • Members
  • Pip
  • 19 posts
  • Gender:Female

Posted 02 October 2009 - 03:56 PM

Could you please post here also your HTML code? Or maybe link to the page for us to see? Thanks!

#3 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 04 October 2009 - 09:30 AM

Yes, seeing the actual HTML code may help us determine what kind of effect you are going for. My guess is you may want to apply the padding not the table itself, but to its cells, or the <td> elements, so it pads anything in those cells as opposed to padding the table. So basically something like this.

.MainColumBoxes td{
width:100%;
border:1px #cacaca solid;
padding:5px;
background:#fff;
}

Again, a link or an example of how your HTML table is setup may help us better see what you are trying to do.

#4 mooreee

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 05 October 2009 - 12:01 AM

Change padding to margin to try again

#5 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 05 October 2009 - 04:19 PM

Oh, it just clicked to me something you might be not figuring out. If you are trying to code for IE6, it computes the width of an element way different than any other browser. It doesn't include padding or borders into the total width of an element. For more info, refer to number 9 in this tutorial: 10 Awful IE Bugs and Fixes.

Edited by Demonslay, 05 October 2009 - 04:20 PM.


#6 John Miller

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Location:Maryland, USA
  • Interests:web design, cars, music

Posted 06 October 2009 - 03:31 PM

Fixed it! Thanks so much.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users