<div> withut linefeed?

E

Els

Frogleg said:
How can I get a 'div' with no top margin? Or is there a better method
for doing this? Example of problem at:

http://home.earthlink.net/~absolutelyfake/test.htm

That /is/ a div without a top margin ;-)
It's a page with a top padding though. Either on <html> or <body> -
fiddle to find the culprit :)

Why are you mixing HTML and CSS for the look though? I'd change
'bgcolor' to background-color to go inside the style attribute, and
align:center on the div seems superfluous, as you already set a width
and a left and right margin in the style too.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Status Quo - ROADHOUSE - Roadhouse Blues - The Wanderer
- Marguerita Time - Living On An Island - Break The Rules
 
F

Frogleg

Why are you mixing HTML and CSS for the look though?

Hiya, Els, and thanks. Why HTML? Because this is quick&dirty
experimentation, and it's easier to tyoe and edit with HTML with
"style" sub-directives. As I get it worked out, I'll use real CSS.
 
J

Jedi Fans

try
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"

in the BODY tag

this could be achieved far easier in css without relying on depreciated
tags...
body{margin:0;}
 
E

Els

Frogleg said:
Hiya, Els, and thanks. Why HTML? Because this is quick&dirty
experimentation, and it's easier to tyoe and edit with HTML with
"style" sub-directives. As I get it worked out, I'll use real CSS.

I didn't mean the style attributes, I meant things like align="center"
and bgcolor="#d4d4d4". I can see the benefit of inline styles when
experimenting, but I mean: if you already have
style="font-size: 4em; font-family: helvetica, sans-serif;"
why not change it into
style="background-color: #d4d4d4; font-size: 4em; font-family:
helvetica, sans-serif;"
instead of adding bgcolor="#d4d4d4d" ?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Shakin' Stevens - What Do You Want To Make Those Eyes At
Me For
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top