Avoiding borders

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all!

How do I avoid borders in my <html> file?

say: <html><body>hello world</body</html>


Re: Avoiding borders

jodleren wrote:
Quoted text here. Click to load it

I presume you mean the white space around the content? If so, these are
called margins/padding. Read up on CSS and margins, then find out how to
remove the margins/padding from the "body" element using CSS.

Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.

Re: Avoiding borders

Quoted text here. Click to load it

OP can put:

* {margin:0; padding:0; border: 0}

in the style sheet and not put any margins, padding or borders in
elements to override this instruction. But it is to be used with
caution. The default css for browsers usually have built in
intelligence to give some reasonable grace to things, paragraphs,
blockquotes and so on. If you wholesale remove all as above, you
need to set margins and paddings specifically to restore this

If this is a snippet from an html file, it is not valid, OP
snipped a ">" for a start.

Secondly, watch out for bare text in the body - under 4.01 Strict
you should be enclosing in an element like <p></p>. Which brings
us to a point: if you do not want borders and space around
something, you can so specify,


Site Timeline