Quick (hopefully) Question of CSS...

I have a quirk that I hoped to find the 'why?' to. Here's the code...

< html >

< head >

Funky P tag < title > < /title >

< style type = "text/css" >

{#outside}

position: absolute;

top: 100px;

left: 100px;

height: 300px;

Width: 300px;

background-color: blue;

padding: 30px 0px;

}

{#inside}

position: relative;

background-color: green;

Width: 300px;

height: 300px;

}

< / style >

< / head >

< body >

< div id = "external" >

< div id = "inside" >

A few words go here...

< p >... .and also here. < /p >

< / div >

< / div >

< / body >

< / html >

Seen in FireFox, everything as expected with a green area inside a blue box with 30 blue pixels above and below the Green, blue from 100px from the top and left of the browser window. Now, if I add a < p > around the text 'a few words go here... '. ', for some reason, push the box down in the blue box in FireFox.

I wonder, why this?

I've found that I can use < br / > tags at the beginning to prevent it from moving, so I do not have a mission-critical 'need a fix now', I'm just curious.

It's just because of the position. Your inner box is relative to the upper part of the absolute element but inside this box is a P element with a higher margin - so he comes down from the top of the absolute element.

The 3 ways around that I know are:

  1. Add the overflow in the #inside div
  2. Change of position: relative to float
  3. Remove the top margin on the P tag

Tags: Dreamweaver

Similar Questions

  • question simple css

    Hello

    I'm stuck with a question simple css-

    I need to display some text below the other strings:

    Text1
    Text2
    Text3

    I use jspx:

    < af:panelGroupLayout layout = "vertical" >

    < af:panelGroupLayout >
    < af:outputText value = "text1" / >
    < / af:panelGroupLayout >

    < af:panelGroupLayout >
    < af:outputText value = "text2" / >
    < / af:panelGroupLayout >

    < af:panelGroupLayout >
    < af:outputText value = "Text3" / >
    < / af:panelGroupLayout >

    < / af:panelGroupLayout >


    well, I receive the channels displayed vertically.


    but I need them to the right of the screen-

    so I use the style class:

    {.textClass}
    float: right;
    }

    and adding in all three group layout in the hope that the three strings to shift right-

    < af:panelGroupLayout layout = "vertical" >

    < af:panelGroupLayout >
    < af:outputText value = "text1" styleClass = "textClass" / >
    < / af:panelGroupLayout >

    < af:panelGroupLayout >
    < af:outputText value = "text2" styleClass = "textClass" / >
    < / af:panelGroupLayout >

    < af:panelGroupLayout >
    < af:outputText value = "Text3" styleClass = "textClass" / >
    < / af:panelGroupLayout >

    < / af:panelGroupLayout >


    they go right, but they are now displayed on one line:

    text3text2text1


    what I wanted was-

    -------------------------text1
    -------------------------text2
    -------------------------text3


    Please suggest.

    Thank you.

    Why so complicated?

                
                    
                    
                    
                
    

    the round is played.

    Timo

  • Question of CSS... Help, please

    Hi all..

    Please help me with this question of CSS.

    I have the following style for my interactive report get the "" «scroll bar»»»

    {#apexir_DATA_PANEL}
    margin-bottom: 10px;
    overflow: auto;
    }

    It works well (there are still a few problems), but it's the only major I face.

    CSS is the application very well when the page loads, but when I navigate among records of IR (report refreshes).
    I'm losing the SCROLL bar.

    Not sure why she does like that.

    Browser: IE 7 (* is the problem of browser *)

    Please help me

    Thank you

    Kumar wrote:

    Browser: IE 7 (* is the problem of browser *)

    Yes. Question interactive report CSS... increasing the width of page to reflect the IR with a scroll bar on the display, allowing the user to view the entire width.

    Delete

    #apexir_DATA_PANEL {
    margin-bottom: 10px;
    overflow: auto;
    }
    

    The IE7 bug can be resolved by feeding it the following CSS fix for browsers of pre - IE8 with a conditional comment in the header HTML page:

    
    

    Specify the scale too static region ID on the region of the infrared for use as a CSS selector.

    However, the presentation of information in a way that requires users to scroll horizontally is awkward. This will be particularly true in combination with a think IR to user experience: y at - it another way to view this information?

  • Another quick question of CSS layout - vertical align: middle

    Just another quick on the use of CSS to the content of the page within the section of the page layout.

    On the homepage below, I have some images with text next to them:

    http://www.Haiji.jp/

    Because of the uneven text, it would be better if the text on the right and left of the four images vertically flown in space.

    (Basically like this old version of the table according to: http://www.haiji.jp/indexcopy.php )

    I don't know vertical-align: middle; doesn't really work for this, but could not get the right way to work.

    I tried variations to have an external container positioned a parent and an absolutely positioned inner container and using top: 50%;

    So for the first row for example CSS is:

    #outerWrapper #contentWrapper #content #row_one {}

    Width: 620px;

    overflow: hidden;

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_left {}

    Width: 210px;

    padding: 0px;

    float: left;

    margin: 0 0 0 0; / * Sets the properties of margin for an element using the shorthand notation (up, right, down, left) * /.

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_right {}

    Width: 410px;

    padding: 0px;

    float: right;

    text-align: left;

    margin: 0 0 0 0; / * Sets the properties of margin for an element using the shorthand notation (up, right, down, left) * /.

    position: relative;

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_right #row_one_right_content {}

    position: absolute;

    top: 50%;

    }

    Who is not doing and maybe overloading the question.

    But if anyone can let me know how to get this vertically positioned text which would be a good thing.

    Thanks again.

    Support IE7 you need to "hack" a little: adjust the "padding-top" according to the number of lines of text, it is a. (not a good solution as supposition is working but IE7 IS a marginal browser now)

    Then add

    the text (see below)

    http://ALT-Web.com/images/alt-Web-logo.gif"/ >

    Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor. Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor.

    http://ALT-Web.com/images/alt-Web-logo.gif"/ >

    Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor. Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor.

    http://ALT-Web.com/images/alt-Web-logo.gif"/ >

    Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor. Vestibule ipsum ipsum, ac malesuada pretium vel gravida malesuada, tortor.

  • Quick SEO question - new domain

    Just a quick and I'm sure that the answer is a resounding no, but wanted to check I'm someone give the right info.

    Basically, someone I know has a site for a company and had a falling out with his partner, who threatens to take down the site.

    Then the other guy wants to make a copy of the site to a new domain that he has a master's degree.

    So the question is will be the new site / domain keep / inherit all rankings SEO of the site existing under it is the same exact content?

    As I said, I would be sure that the answer is no.

    It would be only if the domain name is the same. Who has control of the domain name? That's who is listed as the owner of the domain for the domain name?

  • Question of CSS - height of the external DIV layout

    If all goes well, it is a quick - in the past, I've used CSS for the layout main page, but always used tables in a DIV. But I'll try to be good and the DIVs used it too.

    In any case-, I have here a basic example:

    http://www.learners-Guide.co.UK/lessons/cockpit-drill/layout.php

    With the rank in the main contained Division in two columns, using:

    #outerWrapper #contentWrapper #content #row_one {}

    Width: 580px;

    border: 2px solid #333;

    background-color: #99FF99;

    padding: 10px;

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_left {}

    Width: 288px;

    height: auto;

    padding: 0px;

    float: left;

    margin: 0 0 0 0; / * Sets the properties of margin for an element using the shorthand notation (up, right, down, left) * /.

    }

    #outerWrapper #contentWrapper #content #row_one #row_one_right {}

    Width: 288px;

    height: auto;

    padding: 0px;

    float: right;

    margin: 0 0 0 0; / * Sets the properties of margin for an element using the shorthand notation (up, right, down, left) * /.

    }

    The problem is that the #row_one_left and the #row_one_right columns out of the container DIV. #row_one

    How I would expand container DIV to contain the columns? I can do so by specifying a height of the #row_one DIV, but guess it's poor form and would be produced depending on the results screen / resolution / browser etc.

    I thought that maybe using height: auto; but no joy with either.

    I assume that it should be possible, as it may seem a pretty basic provision requiement.

    Thank you.

    You must use a style that forces this div to clear floats (as floats are removed from circulation, containing elements of law as if they aren't even there).  To do this, something like "overflow: hidden" works beautifully.  So to remove the styles from height: auto (which is the default anyway) and change sound.

    #outerWrapper #contentWrapper #content #row_one {}

    Width: 580px;

    border: 2px solid #333;

    background-color: #99FF99;

    padding: 10px;

    }

    on this subject.

    #outerWrapper #contentWrapper #content #row_one {}

    Width: 580px;

    border: 2px solid #333;

    background-color: #99FF99;

    padding: 10px;

    overflow: hidden;

    }

  • A few questions about CSS

    Hello and happy 'After' Thanksgiving

    I have a page with a divs

    Wrapper

    Header

    mainContent

    Sidebar

    Footer

    I did all my Divs starting with a #.

    #wrapper, #header, etc.

    Inside the #sidebar, I put another Div #articles name which is where I want to go in different articles on different topics

    Example, policy, technology, etc.

    The idea is to change all of these articles with a new, at least every month.

    Now, if I want to change the font, how can h1, h2, p, ONLY within this zone (#articles) I do?

    What I have to do a

    Selector class for each?

    An element selector?

    IM lost

    Other issues are:

    What is the diffenence of

    #sidebar #articles p.

    TO

    #sidebar #articles p (was that with no periods)

    I have more questions, but if I get it first, my weekend will be sky.

    Thank you

    Now, I did all my IDs like that

    #wrapper, #header, etc.

    Thus, its wrong.

    How can I solve this problem?

    Should I start over?

    Change them just manually in the code by removing the ID as octothorpe leader values (' # ').

    I see something like

    . I'm glad

    This is a DIV or a class?

    I'm confused...

    Yes - I see that you are confused.  It's a little confusing at first.  "content" would be a CSS SELECTOR which is a CLASS assignment on an HTML element, for example,

    .  You can use a class given several times on a page, but you can use an ID value once.  This means that each paragraph of the page may have a class of 'content', but that only one element may have an ID of 'content '.

    On the amendment of the police, I want to know, is how to change each element in this particular DIV?

    I told you already.  Re-read my answer.

    So, when should I use one of the other?

    It wouldn't be responsible until we know a) what your HTML looks like, and b) what you are trying to accomplish.  In General with the new CSS users tend to use only class assignments, causing their stylesheets become long, confusing, and terribly redundant.  As gain you more experience, you will discover that you can accomplish the same thing with an unique ID selector (in many cases) that requires several class assignments (for example, my way was suggested to change the font for each content item in)

    ).  Finally, you'll discover the incredible power of descendant selectors by focusing your CSS on a variety of page elements.

    Hope that helps.

  • Another question of css related blogs

    can someone help me please find a way to get the search field to flush left with the word mystery?
    Here is the link:
    http://www.thingsyoungerthanmccain.com/
    and here is the link to the css:
    http://www.thingsyoungerthanmccain.com/wp-content/themes/darknight2.0/style.CSS
    Thank you.

    I don't know what is the cause but probably some inherited rule.
    In any case, you could add a quick fix like this

    #searchform div {margin left:-15px} or something like that.

    Great blog :)

    Joeq skrev:
    > can someone help me please find a way to get the search field to flush
    > left with the word mystery?
    > Here is the link:
    > http://www.thingsyoungerthanmccain.com/
    > and here is the link to the css:
    > http://www.thingsyoungerthanmccain.com/wp-content/themes/darknight2.0/style.css
    > Thank you.
    >
    >

    --
    Kim
    ---------------------------
    http://www.geekministry.com

  • Question of CSS - margin / padding

    Just a quickie if all goes well! I have a page with a list of menu on the left:

    link

    All I want to do is increase the spacing between the lines (Chinese, Persian, etc.)

    The existing code is:

    < div id = "submenu" >
    < ul id = "submenulist" >
    < li > < a href = "chinese.php" > Chinese < /a > < /li > ""
    < li > < a href = "persian.php" > Persian < /a > < /li > ""
    < li > < a href = "tapestries.php" > tapestries < /a > < /li > ""
    < li > < a href = "round.php" > round / oval < /a > < /li > ""
    < li > < a href = "other.php" > other < /a > < /li > ""
    < /ul >
    < / div >

    And the CSS:

    #submenu ul li a
    {
    Background: transparent;
    text-align: left;
    Police: "BOLD" 14px "Trebuchet MS", Verdana, Helvetica, Arial;
    text-decoration: none;
    color: #A1523F;
    }

    I thought that it would be fair to add either

    margin-bottom or padding down, but apparently not...

    What it should be, or I am looking at the wrong bit of CSS?

    You would increase one of those on the li... not on a. one governs the link.
    Or you could try the height of the line.

    --
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e - book for the DMX Zone
    Co-author: Dreamweaver MX: instant troubleshooting (August 2003)
    Technical writer: DMX 2004: The Complete Reference, DMX 2004: a beginner "s
    Guide, Mastering Macromedia contribute
    Technical reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web development

    "Iain71" wrote in message
    News:eotivs$N6P$1@forums. Macromedia.com...
    > Just a quickie if all goes well! I have a page with a list of menu on the left:
    >
    > http://www.oriental-chamber.co.uk/chinese.php
    >
    > All I would do is to increase the spacing between the lines (Chinese,
    (> Persian etc.)
    >
    > Existing code is:
    >
    >


    >
    > And the CSS:
    >
    > #submenu ul li a
    > {
    > background: transparent;
    > text-align: left;
    > fonts: "BOLD" 14px "Trebuchet MS", Verdana, Helvetica, Arial;
    > text-decoration: none;
    > color: #A1523F;
    > }
    >
    > I thought it fair to add either
    >
    > low-margin or padding down, but apparently not...
    >
    > That should be, or I am looking at the wrong bit of CSS?
    >
    >
    >

  • Question general css

    Still new to this, let me go lay on you.
    Situation, I have a single table in the middle of the page, ~ 2 "the gap between the border of the page and table, (all sides).
    Question: Why when I move the cursor to the left, down and to the right of the table out of the way, the cursor seems normal, but when I move the cursor above the table (away from 2 ") the default cursor to the table.
    Guess: I goofed a heading upward, or some invisible margin?

    Hello

    It could be a margin, the body or the table.
    We need to see the code to know for sure.

    You can check it as a reduction to zero in on the margin of the body in your CSS:

    {body
    margin: 0;
    padding: 0;
    }

    Then, simply replace any margin value in the CSS table with margin: 0px;

    If the top of the table is now flush with the upper part of the browser window, it
    was a matter of margin.
    If not, there is something else... the table inside another tag, impossible to
    know without looking.

    Take care
    Tim

    "jquest4" wrote in message
    News:g68gnp$K08$1@forums. Macromedia.com...
    > Still new to this, let me go profane on you.
    > Situation, I have a single table in the middle of the page, ~ 2 "gap
    > between
    > page border and the edge of the table, (all sides).
    > Question: why when I move the slider left, down and to the right of the
    > drop into the ditch, the slider looks normal, but when I move the cursor
    > above the
    > table (away from 2 "), the default cursor to the table.
    > Guess: I goofed a heading upward, or some invisible margin?
    >

  • Question about CSS @import and some confusion ID

    1ST QUARTER)

    I read that to be correct, you should not use more than one < link href... > a page but only use one, then the @import to make reference to others. I understand that other < link href... > is intended for users to select a preferred style. So far, the browsers seem to make pages using all style sheets related and I've never used a @import. Which is better?

    Q2)

    Say you have < div ID = 'something' > or < div class = 'something' > I think I saw rules expressed with the referenced before theID or class of CSS rules like this tag

    div.somthing or div #something

    What is the difference between this and

    .quelquechose div

    I think that these last styles a .div down the container the < div class = 'something' > but after that, things are a little blury.

    Sorry to ask you this my being a really fundamental question and do not think that I do not read that sort of thing - it is not just pass through!

    Thank you

    Martin

    > I read that to be correct, that you should not use more than one<>
    > href... >
    > to a page

    Where did you read that?

    > What is the best?

    What works for you is the best.

    > div.somthing or div #something
    >
    > What is the difference between this and
    >
    > .quelquechose div

    The former accomplishes two things:

    1. it restricts the rule applies only to the elements in div.something,
    and not to p.something or ul.something.
    2. He adds 'priority' to the selector so that it can substitute for others
    conflicting style in which case would be a simple selector, not made up
    not. For example, in this case.

    p.something {color: blue ;}}
    .quelquechose {color: red ;}}

    This text-

    What color?

    would be blue.

    The latter is completely different. You read your selectors from right to
    on the left, so .quelquechose div would specify the div that is a descendant of the any
    ancestor with a class of 'something' (and not just a div).

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    ==================

    "martcol" wrote in message
    News:gg8n05$LFQ$1@forums. Macromedia.com...
    (> Q1)
    >
    > I read that to be correct, that you should not use more than one<>
    > href... >
    > to a page but only use one, then the @import to make reference to others. I have
    > understand than others of are intended for users to choose a favorite
    > style. So far, the browsers seem to render pages using all the linked style
    > leaves and
    > I have never used @import. Which is better?
    >
    (> Q2)
    >
    > Let's say you have

    or
    I think I have
    > have
    > given rules expressed with the referenced before theID or class tag in CSS
    > rules
    > like that
    >
    > div.somthing or div #something
    >
    > What is the difference between this and
    >
    > .quelquechose div
    >
    > I think that these last styles a .div descendant of the container<>
    > class = 'something' > but after that, things are a little blury.
    >
    > Sorry to ask you this my being a really fundamental question and do not think that I am not
    > read this stuff - it's not just pass through!
    >
    > Thank you
    >
    > Martin
    >

  • Questions about css vertical-align

    given a list of the CSA page: Technologies of Mac OS X

    I do not understand vertical-align.  I will like to center the text in the vertical alignment.  I don't know what basis means, or intermediate. Where Ref base?  background of the characters or what?  I don't know how to work the percentages.

    In addition to all this lack of knowledge, 5% of the centers of communities Word for some reason I don't know.  'Contact support' appears to be centered for some reason any.

    with this css

          /* top line:
             Communities                Contact support */
          header#j-header nav#j-globalNav-bg {
              background-color: tan !important;
              margin-top: -15px !important;
             }
           /* Communities */
          div#body-apple header div#apple-site-title a {
            
              font-size: 20px !important;
              background-color: yellow !important;
              vertical-align: 5% !important;
             }
          /* Contact Support */
          div#body-apple header ul#contact-support-link a {background-color: pink !important;}
    
  • Really simple (hopefully) question about GPIB-USB-HS

    I tried to reconnect a GPIB-USB-HS to a network through a PC HP on shelf Analyzer. Before removing the GPIB-USB-HS system about a week or two ago, Network Analyzer (a vintage 1989 HP 8720 vector Network Analyzer) had worked well with the GPIB unit. Now that I reconnected the GPIB device to network monitor, measurement and automation seems not be able to detect the Network Analyzer.

    My question is: if my GPIB-USB-HS appear in measurement and automation, and it passes the NOR-488. 2 troubleshooting of HW and SW utility test, it would be safe for me to assume that whatever connection problems I have with the Analyzer network, rather than with the GPIB-USB-HS itself?

    Thank you

    Armando83

    I finally got the connection working again. I just had to tighten the screws on the GPIB-USB-HS to make sure it's a good connection to the Network Analyzer so that it can work.

    Thanks again for your help, Dennis.

  • Question of CSS... (please help)

    Hi all...

    Anyone who is good in CSS.
    Please help me with the following problem.

    Topic: 9
    Apex: 4.1
    Browser: IE 7
    Database: 11g

    I use the "" side bar area' "THEME 9.
    The "" TITLE bar"" sidebar region is in "'red.'" »

    I tried to change it to '' blue'. I tried the following styles, but it has not applied

    {code}
    . Sidebar-region h3 {}
    background-color: rgb (118,164,190);
    }

    } .sidebar-region
    background-color: rgb (118,164,190);
    }

    {code}

    I checked the sidebar region model and found the classes it uses.


    Here are the following classes using the APEX.

    {code}
    } .sidebar-region
    float: right;
    Width: 200px;
    display: inline;
    overflow: hidden;
    }

    . Sidebar-region h3 {}
    Width: 192px;
    line-height: 22px;
    height: 22px;
    margin: 0;
    padding: 0 0 0 9px;
    Background: url (.. /images/BG-title-SB.gif);
    color: #fff;
    }

    . Sidebar-region h3 {}
    Width: 192px;
    line-height: 22px;
    height: 22px;
    margin: 0;
    padding: 0 0 0 9px;
    Background: url (.. /images/BG-title-SB.gif);
    color: #fff;
    }

    . Sidebar-region .box {}
    Background: url (.. /images/BG-Box.gif);
    margin: 0 8px 0;
    }

    . Sidebar-region .frame {} .box
    Background: url (.. /images/BG-Box-Frame.gif) no-repeat 0 100%;
    Width: 200px;
    overflow: hidden;
    padding: 4px 4px 6px 6px;
    }

    . Sidebar-region content {}
    margin: 10px 0 0 2px;
    }

    {code}



    Thank you

    Hello

    H3 tag have the image as a background.
    http://Apex.Oracle.com/i/themes/theme_9/images/bg-title-SB.gif
    This is why you cannot assign color background-color style.

    You need create your own picture or use another image and change of style as

    .sidebar-region h3 {
         background: url(#IMAGE_PREFIX#/apex/builder/bg-title-blue.gif) repeat scroll 0 0 transparent!important;
    }
    

    Or remove the style of with on background image path

    .sidebar-region h3 {
        background: #76A4BE!important;
    }
    

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

    Published by: jarola December 12, 2011 21:11

  • Question about CSS styles in the tutorial on creating your first website part 2

    Hello

    I am currently on the tutorial on creating your first Web site 2 part. http://www.adobe.com/devnet/dreamweaver/articles/dw_html5_pt2.html . I am creating a new CSS style for #logo h1, h2 #logo. My text does not move off the screen and the Citrus coffee still has the text header in front of him. The instructions are not very clear. Can someone please explain what I'm doing wrong?

    Thank you

    Alexisonsmith3

    Another thing you can try to do is to change the case of your CSS tags:

    #logo hgroup {}

    position: absolute;

    top:-500px;

    }

    Definition above can be:

    #Logo hgroup {}

    position: absolute;

    top:-500px;

    }

    It is also recommended to always use lowercase letters to set all your CSS rules.

    I don't know if it will really work - but just a thought

Maybe you are looking for

  • Recover folders and content that are gone

    All of a sudden the subfolders in my Inbox for one of my accounts have disappeared, even though I see them again (and their content) when I accessed this account through outlook and webmail provider. I want to see (and their contenets) in the left pa

  • How can I turn on enter semi-automatic filling out forms automatically?

    only not form passwords

  • The unidentified editor warning

    I downloaded, installed and safely played some MMO games, however, although they are the most used programs on my computer, I receive an unidentified editor warning every time I ever start them. Is it possible to make sure I don't get this caveat for

  • No no its inspiron 15-3542 ubuntu 12.04 but speaker...

    No problem with his helmet Tested speakers and works well under dell tests Followed all the recommended forums answers but still speakers are silent under ubuntu 12.04!

  • XML parser - display order

    Hello I have a program that does the following: 1 contact the http server and executes a query on a mysql database. 2 Php script generates an xml file 3. XML file is downloaded on the BlackBerry. Steps one and two work perfectly well - no problem the