HighDots Forums  

body id

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss body id in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bigoxygen@gmail.com
 
Posts: n/a

Default body id - 02-14-2005 , 03:25 PM






Hello.

I would like to have a title bar (that has a logo) that is flush with
the top of the browser display window.

My code right now looks like this...

<body id="evalResults">
<div class="logo"><img src="./images/ipeer_logo.png"></div>


The problem is that there seems to be an extra "<br>" before by div
section, so it is not flushed with the top. Please help.

Thank you.

PS when I remove the id="evalResults", the title bar works, but I lose
all the other styles.


Reply With Quote
  #2  
Old   
bigoxygen@gmail.com
 
Posts: n/a

Default Re: body id - 02-14-2005 , 03:28 PM






An example of what I would like is this:

http://142.103.119.145/top.htm


Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: body id - 02-14-2005 , 03:35 PM



bigoxygen (AT) gmail (DOT) com wrote:
Quote:
Hello.

I would like to have a title bar (that has a logo) that is flush with
the top of the browser display window.

My code right now looks like this...

body id="evalResults"
div class="logo"><img src="./images/ipeer_logo.png"></div

The problem is that there seems to be an extra "<br>" before by div
section, so it is not flushed with the top. Please help.

Thank you.

PS when I remove the id="evalResults", the title bar works, but I
lose all the other styles.
The problem is probably caused by some part of your page that you
haven't shown us. My first reaction to your PS is that it has something
to do with your CSS for #evalResults--but I have no way to check, since
you haven't made it available. My psychic abilities are regrettably
limited. Please provide a link to the page that is manifesting the problem.


Reply With Quote
  #4  
Old   
bigoxygen@gmail.com
 
Posts: n/a

Default Re: body id - 02-14-2005 , 03:51 PM



Hi

The page in question...

http://142.103.119.145/test.htm


Reply With Quote
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: body id - 02-14-2005 , 04:17 PM



bigoxygen (AT) gmail (DOT) com wrote:
Quote:
Hi

The page in question...

http://142.103.119.145/test.htm

You've got

body {
margin: 0;
padding: 0;
font-family: Verdana, Arial, Helvetica, Sans-serif;
/* default font-size is also defined in ./css/font/normal.css */
font-size: 76%;
color: #333;
background: #789;
}

and then you've got

#evalResults body {

background-color: #666666;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;

and then

#evalResults div.logo {
width: 100%;
background-color: #778899;
padding: 3px;

but then, finally,

#evalResults {
background: #fff;
margin-left: 0px;
margin-top: 15px;
margin-right: 0px;
margin-bottom: 15px;
}

So you're getting top and bottom margins of 15px for an element with
id="evalResults" because you explicitly declared them in the
/#evalResults/ selector.

Why don't the property values declared for the /#evalResults body/
selector supersede these? Because that selector selects BODY elements
that are INSIDE an element with id="evalResults". If you want that block
of properties to apply to a BODY element HAVING id="evalResults", you
need /body#evalResults/. Values of properties declared for that selector
should override the values of the same properties set for the plain
/#evalResults/ selector.

--
Harlan Messinger
Supporting member of Virginia Concubines for Traditional Marriage


Reply With Quote
  #6  
Old   
bigoxygen@gmail.com
 
Posts: n/a

Default Re: body id - 02-14-2005 , 05:07 PM



I'm wondering why there still is a thin margin that initiates the
horizontal scrollbars.

http://142.103.119.145/test2.htm


Reply With Quote
  #7  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: body id - 02-14-2005 , 05:35 PM



bigoxygen (AT) gmail (DOT) com wrote:
Quote:
I'm wondering why there still is a thin margin that initiates the
horizontal scrollbars.

http://142.103.119.145/test2.htm
Because you've made the body wider (and higher) than the browser pane.
Why did you set a -3px margin on the body?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.