Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
inline css question
#2
I dont quite understand what you want from the code example you gave. There is no padding or margins on the code above, because it is not inside a larger element on the page.

The following properties are what you will be needing if you run into this problem in the future however:
Code:
padding
margin

Both support up to four paremeters, whereby 1,2,3,4 match top, right, bottom, left respectively. Or alternatively you can extend the properties with -[left|right|top|bottom] for specifying only one value to be different. E.g.
Code:
/*1px,2px,3px,4px are top,right,bottom,left repectively*/
padding-top: 1px 2px 3px 4px
padding-bottom
padding-left
padding-right

In order to access these, you must use the style, class or id attribute inside your tag to get the styles to render upon said element.

Side Note: I would advise against using the style attribute because you will not be able to cache your css, meaning slower page load times in the future.
Reply


Messages In This Thread
inline css question - by andrewjs18 - 03-20-2012, 09:46 PM
RE: inline css question - by Haxalot - 03-24-2012, 10:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Free Worker HTML, CSS, Javascript ImFocuzz 2 1,284 04-05-2014, 10:01 PM
Last Post: VHPanda
  Forum CSS code problem. inferno.lion 0 822 06-10-2013, 02:48 AM
Last Post: inferno.lion
  MyBB CSS Postbit Buttons Peter L 1 1,444 07-14-2012, 05:52 PM
Last Post: 'Snorlax
  Need a CSS Teacher! ImFocuzz 2 1,089 03-08-2012, 06:01 PM
Last Post: BreShiE
  Problem with CSS navigation Fragma 3 1,195 02-02-2012, 02:33 PM
Last Post: Fragma

Forum Jump:


Users browsing this thread: 2 Guest(s)