Remove spacing between div tags

Is it possible to remove the spacing between div tags? If so
how do you do it?

Can you just post a link to the page rather than the mangled
poo that the
webforum hands us? (see below)
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"lockw" <[email protected]> wrote in message
news:[email protected]...
> Here is the code I am working with. i am trying to
remove the spacing
> between
> the header and the left and right navigation.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
> <title>Untitled Document</title>
> <style type="text/css">
> <!--
> #container {
> margin: auto;
> width: 990px;
> }
>
> #container #left {
> background-color: #999999;
> background-position: top;
> float: left;
> width: 200px;
> padding-right: 15px;
> padding-left: 15px;
> border-right: 1px solid #666;
> margin-top: 0px;
> margin-right: 0px;
> margin-bottom: 0px;
> margin-left: 0px;
> }
> #container #left ul {
> list-style: none;
> margin: 0;
> padding: 0;
> }
> #container #left ul li {
> margin: 0;
> border-top: 1px solid #003;
> }
> #container #left ul li a {
> display:block;
> padding: 2px 2px 2px 0.5em;
> border-right:1px solid #69C;
> border-bottom: 1px solid #369;
> background-color: #036;
> color: #fff;
> text-decoration:none;
> width:100%;
> }
> html>body #container #left a {
> width:auto;
> }
> #container #left ul li a:hover {
> border-right: 1px solid #69c;
> border-bottom: 1px solid #369;
> background-color: #69f;
> color:#fff;
> }
>
>
>
>
>
>
> #container #main {
> margin-top: 0px;
> margin-right: 250px;
> margin-bottom: 0px;
> margin-left: 250px;
> }
> #container #right {
> background-color: #666666;
> float: right;
> width: 200px;
> padding-left:15px;
> padding-right:15px;
> }
> #container #header {
> background-color: #003366;
> float: none;
> clear: none;
> margin-bottom: 0px;
> }
> .style1 {color: #CCCCCC}
> .style2 {color: #FFFFFF}
> body,td,th {
> font-family: Arial, Helvetica, sans-serif;
> font-size: 10pt;
> }
>
> #container #footer {
> float: none;
> clear: both;
> }
> a:link {
> color: #000099;
> text-decoration: underline;
> }
> a:visited {
> text-decoration: underline;
> }
> a:hover {
> text-decoration: none;
> color: #666666;
> }
> a:active {
> text-decoration: underline;
> }
> #container #right #rightnavtop {
> }
> #container #right #rightnavtop ul {
> list-style: none;
> margin: 0;
> padding: 0;
> }
> #container #right #rightnavtop ul li {
> margin: 0;
> border-top: 1px solid #003;
> }
> #container #right #rightnavtop ul li a {
> display:block;
> padding: 2px 2px 2px 0.5em;
> border-right:1px solid #69C;
> border-bottom: 1px solid #369;
> background-color: #036;
> color: #fff;
> text-decoration:none;
> width:100%;
> }
> html>body #container #right #rightnavtop a {
> width:auto;
> }
> #container #right #rightnavtop ul li a:hover {
> border-right: 1px solid #69c;
> border-bottom: 1px solid #369;
> background-color: #69f;
> color:#fff;
> }
>
> -->
> </style>
> </head>
>
> <body>
>
> <div id="container">
> <div id="header">
> <p class="style1">Header</p>
> <p> </p>
> <p> </p>
> </div>
> <div id="left">
>
>
<a href="#">Pharma</a></li>
>
<a href="#">Diversity</a></li>
>
<a href="#">Marketing</a></li>
>
<a href="#">Sales</a></li>
>
<a href="#">Money</a></li>
>
<a href="#">Stock</a></li>
>
</li>
>
<a href="#">Advertising</a></li>
>
</li>
> <p>lklkmklml</p>
>
> </div>
>
> <div class="style2" id="right">
> <div id="rightnavtop">
>
>
<a href="#">Real Estate</a></li>
>
<a href="#">Commercial Real Estate</a>
>
>
<a href="#">Recruitmen</a></li>
>
> </li>
>
> </div>
> <p><br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> </p>
> <p> </p>
> <p> </p>
> <p> </p>
> <p><br />
> </p>
> </div>
> <div id="main">
>
> <p>The main content will go here The main content
will go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here The
main content will
> go
> here The main content will go here The main content will
go here The main
> content will go here The main content will go here
<br />
> </p>
> <p> </p>
> <p><br />
> <br />
> <br />
> <br />
> </p>
> </div>
> <div id="footer">
> <p>
<br />
> Advertising Categories: <a
href="#">Residential Real Estate</a> |
> <a
> href="#">Commercial Real Estate</a> | <a
href="#">Recruitment</a> | <a
> href="#">Small Business</a> | <a
href="#">Automotive</a> | <a
> href="#">Franchise</a> | <a
href="#">Legal</a> | <a href="#">Obituary</a>
> | <a
> href="#">Online Verticals</a></p>
> <p>
Audience: <a href="#">Profiles</a> | <a
> href="#">Circulation</a> |
> <a href="#">Testimonials</a> </p>
> <p>
Solutions: <a href="#">Small Advertiser</a> |
<a
> href="#">Medium
> Advertiser</a> | <a href="#">Larger
Advertiser</a>| <a
> href="#">Advertisment
> Dimensions</a></p>
> <p>
Purchase Now: <a href="#">Purchase
Now</a></p>
> </div>
> </div>
> </body>
> </html>
>
>

Similar Messages

  • Removing Line between Div tags

    Hi all.  I am new to this forum - have just started using DIV Tags and am getting a bit messed up!!  I have a simple web page that has 2 DIV statements - on loads a menu bar I have created in Fireworks and is rihgt justified, the other is a header that contains an image and is centred.  I have specified a coloured page background.  Trouble is, I have a line between my two div tags that shows the background colour!  I just cant get rid of it - I have tried the "Display - Inline" but that doesn't work.  I have tried "Float Left" and "Right" - no-good.  I dont know what to do!  It could be that I am using these commands in the wrong place?  There seems to be quite a lot of stuff on the net about this issue but I cant get any of the solutions to work for me.  Please can anyone help?
    Here is an example of my code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    body {
    background-color: #C90;
    .menu {
    BACKGROUND: #000000;
    .header {
    BACKGROUND: #000000;
    </style>
    </head>
    <body>
    <DIV class=menu align="right" >
    <P> </P>
    <P> </P>
    </DIV>
    <DIV class=header align= "center">
    <P> </P>
    <P> </P>
    <P> </P>
    </DIV>
    </body>
    </html>

    This is invalid markup.
         <DIV class=menu align="right" >
         </DIV>
         <DIV class=header align= "center">
         </DIV>
    CSS should look like this:
    body {
    margin:0;
    padding:0;
    background: #C90;
    color: #000;
    #wrapper {
    width: 970px; /**some value in px, % or ems**/
    margin: 0 auto; /**with width, this centers page**/
    background: #FFF;
    border: 2px solid #000;
    #menu {
    background: #000;
    text-align:right;
    margin:0;
    padding:0;
    #header {
    background: #000;
    width: 970px;
    margin:0 auto;
    padding:0;
    Then add the relevant selector ID (or .class) to your markup like so.
    <body>
    <div id="wrapper>
    <div id="menu">
    your menu code here
    </div>
    <div id="header">
    your header here
    </div>
    <p>your content goes here<p>
    <!--end wrapper--> </div>
    </body>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Remove spacing between minimize mazimize close buttons.

    How remove spacing between minimize, maximize, close buttons. Problem is only in firefox, when hide menu bar.
    image: http://www.bildites.lv/images/jx5yixdwdam0b5clli3.jpg
    Icons should be like in my computer window.
    OS: Windows XP; SP3
    Theme: http://www.crystalxp.net/galerie/en.id.130.htm
    Firefox 4.0 Beta 10

    Has anyone found a solution for this yet? I've searched everywhere, but have found little mention of the problem, let alone a fix. I have the same conditions as the original poster: XP, 3rd party visual style, and problem disappears when enabling the menu bar. My Windows caption buttons appear exactly like the posted screenshot. I would imagine CSS could fix it. Thanks,
    Brandon

  • CSS wierds - spaces between div tags

    Safari v4.0.4
    I'm seeing spaces between div tags that are not appearing in FF3.x or IE7&8
    I have inspected these tags and I can not locate where or what might be pushing the div's appart..
    Example: http://dev7.esonicspider.net/facility_overview.html
    Notice the black bar under "Prepare For Frequent Infection Control...." sub title in the header
    The image is 800x209px and the div is defined as the same:
    div#splashfacilityov { position:relative;
    background:url('images/facility_header.jpg') 0 0 no-repeat;
    width:800px;
    height:209px;}
    ..the next div in the stack is:
    div#submenubar { position:relative;
    background:url('images/submenu_bkgr.jpg') 0 0 no-repeat;
    width:800px;
    height:24px;}
    I have played around with both and can not see why that 20px bar is there between the two div's
    Any hints as to what Safari needs here..??
    Thanks John...

    Found that
    @charset "UTF-8";
    in the style sheet was the main problem..

  • Gaps between divs tags in IE8

    I designed a custom Facebook welcome page in DW and transfered it to FB.  According to BrowserLabs, it looks fantastic on every browser and platform except IE8, which shows horizontal gaps between each div.  I have tried and tried and can not find a solution.  Thank you so much for your help.
    http://www.facebook.com/RiverCoyoteDesign
    Here is the entirety of the code:
    <style type="text/css">
    #wrapper {
        margin: 0px auto;
        padding: 0px;
        width: 520px;
        height: 703px;
    .like-us {
        height: 112px;
    .quote {
        height: 112px;
        width: 157px;
        float: left;
    a img {border:none;}
    .bot-nav {
    .below-like {
        height: 55px;
    .clearfloat {
    margin: 0px;
    clear: both;
    height: 0px;
    }.web-design {
        height: 171px;
    .below-web {
        height: 57px;
    .logo-design {
        height: 211px;
    .below-logo {
        height: 43px;
    .nav {
        background-color: #050c0f;
    </style>
    <div id="wrapper">
      <div>
      <div class="like-us"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_01.jpg" width="363" height="112" /><a href="http://www.rivercoyotedesign.com/quote.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_02.jpg" width="157" height="112" /></a></div>
      </div>
      <div class="below-like"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_03.jpg" width="520" height="55" /></div>
      <div class="web-design"><a href="http://www.rivercoyotedesign.com/portfolio.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_04.jpg" width="520" height="171" /></a></div>
      <div class="below-web"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_05.jpg" width="520" height="57" /></div>
      <div class="logo-design"><a href="http://www.rivercoyotedesign.com/logos.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_06.jpg" width="520" height="211" /></a></div>
      <div class="below-logo"><img src="http://rivercoyotedesign.com/fb-graphics/mock1b-rev1-flattened_07.jpg" width="520" height="43" /></div>
      <div class="nav">
        <div class="bot-nav"><a href="http://www.rivercoyotedesign.com/portfolio.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/bot-nav-flat1_01.png" width="162" height="19" /></a><a href="http://www.rivercoyotedesign.com/logos.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/bot-nav-flat_02.png" width="131" height="19" /></a><a href="http://www.rivercoyotedesign.com/enews.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/bot-nav-flat_03.png" width="227" height="19" /></a></div>
      <div class="bot-nav2"><a href="http://www.rivercoyotedesign.com/business-cards.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/bot-nav-flat_04.png" width="221" height="37" /></a><a href="http://www.rivercoyotedesign.com/ecommerce.htm" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/bot-nav-flat_05.png" width="124" height="37" /></a><a href="http://www.rivercoyotedesign.com/" target="_blank"><img src="http://rivercoyotedesign.com/fb-graphics/bot-nav-flat_06.png" width="175" height="37" /></a></div></div>
    </div>

    "BruceCSI2" <[email protected]> wrote in
    message
    news:fgnj8t$pan$[email protected]..
    >I set up this demo page,
    http://www.mistchild.com/gruen/index.htm
    and there
    >are
    > gaps between divs when viewed in IE, but not Opera or
    FF. The weird thing
    > is,
    > they show up between the themepic div and the nav div,
    and between the
    > content
    > div and bottom div, but not between the nav div and the
    content div. I've
    > set
    > top margins of 0 for all divs in my stylesheet.
    > Can anyone help me figure this one out?
    Your construct is really "weird", try this:
    #nav,#content,#bottom{float:none}
    img{vertical-align:bottom}
    If that fixes your problem, then you can simply *remove* the
    float
    declarations from your sheet.
    As a side note, you should try to keep things as simple as
    possible. I'm
    sure you can safely remove "position:relative" from many
    rules. Also, there
    is no need to set a width on DIVs that are not floats (their
    natural
    behavior is to fill the the parent container).
    HTH,
    Thierry
    Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    http://www.divahtml.com/products/scripts_dreamweaver_extensions.php
    - divaGPS - Add "you are here" highlighting to virtually any
    menu
    - divaFAQ - Create FAQ pages that toggle (show/hide) the
    answers
    - divaPOP - Easy, clean, standards-compliant popup windows.

  • Spacing between divs

    I am having trouble spacing the divs on my page.  I would like to have some div's stacked one on top of the other and in dreamweaver they look fine but in the browser it looks like the browser is not correctly displaing the margins and padding... any suggestions?

    You also have several HTML errors, such as name="" and closing </p> with no corresponding opening <p>
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.applesenglish.com%2FZone%2Fba se1.html
    And some broken CSS
    In div.css, .menudiv is missing its closing }.
    In rssstyles.css, you have an extra closing } on line 52 and a spurious . (dot) on line 65.
    http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww. applesenglish.com%2FZone%2Fbase1.html
    Mark A. Boyd
    Keep-On-Learnin' :-)
    This message was processed and edited by Jive.
    It shall not be considered an accurate representation of my words.

  • Unwanted spacing between divs in IE

    I'm in the beginning stages of laying out a website in CSS
    and I have already ran into a problem. I have a "header" div and a
    "nav" div stacked directly on top of each other. When I test in
    firefox everything looks fine, but in IE there is a space that I
    can not make disappear for the life of me.
    Here are links to the page and the CSS file:
    http://www.sethglass.net/luster/lusters_temp.html
    http://www.sethglass.net/luster/css/001.css
    Help is greatly appreciated!!! Thank you

    Image tags are inline tags. Being inline, they are rendered
    in 'text
    boxes'. Text boxes have space at the bottom for glyph
    descenders, like on
    "g" or "j" (and space at the top, too). By making that image
    display:block,
    you remove the space requirement.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "sgl0ss" <[email protected]> wrote in
    message
    news:e35f5g$a5s$[email protected]..
    > Thank you!!! Could you please explain this to me? If you
    have time.
    >
    >
    > Originally posted by: Newsgroup User
    > Add this to your stylesheet -
    >
    > #header img { display:block; }
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "sgl0ss" <[email protected]> wrote in
    message
    > news:e35ctb$5tm$[email protected]..
    > > I'm in the beginning stages of laying out a website
    in CSS and I have
    > > already
    > > ran into a problem. I have a "header" div and a
    "nav" div stacked
    > > directly on
    > > top of each other. When I test in firefox
    everything looks fine, but in
    > > IE
    > > there is a space that I can not make disappear for
    the life of me.
    > >
    > > Here are links to the page and the CSS file:
    > >
    http://www.sethglass.net/luster/lusters_temp.html
    > >
    http://www.sethglass.net/luster/css/001.css
    > >
    > > Help is greatly appreciated!!! Thank you
    > >
    >
    >
    >
    >
    >
    >

  • How to avoid extra div tags, when we add components using cq:include

    I tried using the below code in my component jsp from forums to remove those extra div tags when we try to add components using <cq:include tags.
    <%
       if (WCMMode.fromRequest(request) != WCMMode.EDIT && WCMMode.fromRequest(request) != WCMMode.DESIGN) {
           IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE);
    %>
    But this code helped to remove most of the extra div tags , but still adds this extra div tag to the first component I add using  <cq:include tag.
    its a basic and very critical necessity to maintain our markup design,But due to this  dynamically added extra div tag will hinder the html and css behaviour of the page.
    Appreciate your help to resolve this issue.
    Thanks

    Hi,
    Can you try below if you really dont want to include anything during include.
    <%
    IncludeOptions opts=null;
       if (WCMMode.fromRequest(request) != WCMMode.EDIT && WCMMode.fromRequest(request) != WCMMode.DESIGN) {
    opts= IncludeOptions.getOptions(request, true);     
    opts.forceSameContext(Boolean.TRUE);
    opts.setDecorationTagName("");
    %>
    Thanks,
    Pawan

  • Removing before/after spacing on h tags

    I have had h1 and h2 tags working fine (that is, with space removed before and after the tags), using this code:
    h2 {color: #000000; padding:0px; margin:0px; font-family: century gothic; font-weight:normal; font-size: 17px;}
    h1 {color: #FF0000; padding:0px; margin:0px; font-family: century gothic; font-weight:normal; font-size: 20px;}
    But when I added an h3 tag using the same code:
    h3 {color: #FF0000; padding:0px; margin:0px; font-family: century gothic; font-weight:normal; font-size: 14px;}
    normal H tag spacing re-appeared after the h3 tag.
    Code for the table following the h3 tag is as follows (in case this is somehow throwing things off):
    <table class="special" width="804" cellpadding="0" cellspacing="0" style="background-image:url(images/flag-exta.jpg )"
    Only other change I made to coding since the h1 and 2 tags were working without spacing between them was to add css coding to address a border issue, now resolved:
    table.special {border: 3px solid #999; }
    table.special td {border: none; }
    Can't see how the code in the table following the h tags or the css coding addition effects the h3 spac issue (if I delete both codes I still have the h3 space problem).
    Substituting 'display:inline;' coding for 'padding:0px; margin:0px;' doesn't make any difference either.
    Much appreciate any guidance. Thanks.

    DAVID,
    I changed the code for all the font names which included spaces as you advised (see below). This includes the "Times New Roman", font which is included as you see with other fonts in a given span class. This multi-font nomenclature was set by someone who initially developed our site many years ago. Is this multi-font span declaration legit and executed correctly: {font-family: Georgia, "Times New Roman", Times, serif; ...} ?
    Thanks again for you input.
    Bill
    span.c26
    span.c25
    span.c24
    span.c23
    span.c22
    span.c21
    span.c20
    span.c19
    span.c18
    span.c17
    span.c16
    span.c15
    span.c14
    span.c13
    span.c12
    span.c11
    span.c10 {font-family: Georgia, "Times New Roman", Times, serif}
    span.c9
    span.c8
    span.c7
    span.c6 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 90%}
    span.c5 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 50%}
    span.c4 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 60%}
    span.c3 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 80%}
    span.c2 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 70%}
    span.c1 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 80%}
    div.c17
    div.c16 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 70%}
    div.c15
    div.c14 {text-align: center}
    div.c13 {text-align: center}
    div.c12 {text-align: center}
    div.c11 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 80%; text-align: left}
    div.c10 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 80%; text-align: center}
    div.c9 {font-family: Georgia, "Times New Roman", Times, serif; font-size: 60%; text-align: center}
    div.c8
    div.c7
    div.c6
    div.c5
    div.c4
    div.c3
    div.c2
    div.c1 {text-align: center}
    table.c7 {background-color: #FFFFFF}
    table.c5 {background-color: #FFFFFF}
    table.c4 {background-color: #EEFFFF}
    h4.c3
    h4.c2
    h4.c1
    h3
    h2
    h1
    tr.c7 {background-color: #FF0000}
    tr.c6 {background-color: #FF0000}
    p.c14 {text-align: center}
    p.c3 {text-align: center}
    p.c2 {text-align: center}

  • How can I remove all content between two tags using Find/Replace regular expressions?

    This one is driving me bonkers...  I'm relatively new to regular expressions, but I'm trying to get Dreamweaver to remove all content between two tags in an XML document.  For example, let's say I have the following XML:
    <custom>
    <![CDATA[<p>Some text</p>
    <p>Some more text</p>]]>
    </custom>
    I'd like to do a Find/Replace that produces:
    <custom>
    </custom>
    In essence, I'd like to strip all of the content between two tags.  Ideally, I'd like to know how to strip the CDATA content as well, to return the following:
    <custom>
    <![CDATA[]]>
    </custom>
    I'd much appreciate any suggestions on accomplishing this.
    Many thanks!

    Thanks much for your response.  I found David's article to be a little thin with respect to examples using quantifiers in coordination with the wildcard metacharacters; however, I was able to cobble together a working expression through trial and error using the information he presented.  For posterity, here’s the solution:
    Find:
    <custom>[\d\D]*?</custom>
    Replace:
    <custom>
    <![CDATA[]]>
    </custom>
    I believe this literally translates to:
    [] = find anything in this range/character class
    \d = find any digit character (i.e. any number)
    \D = find any non-digit character (i.e. anything except numbers)
    *? = match zero or more times, but as few times as possible (i.e. match multiple characters per instance, but only match one instance at a time, or none at all)
    I’m still not sure how to effectively utilize the . wildcard.  For example, the following expression will not find content that ends with a number:
    <custom>.*?[\D]*?</ custom >
    I'm presuming this is because numbers aren't included in the \D metacharacter; however, shouldn't numbers be picked up by the .*? expression?

  • Difference Between Insertions for Div Tags

    Hi,
    What is the difference between "after tag" or "after the start of tag" when inserting a div tag?
    Is one included in the same "container" (div tag) and the other one just "follows" after the previous div tag?
    Thanks,
    njdesigner1944

    "after tag" inserts your div after the closing tag of the choosen div. The "after start tag" inserts the new div after the right after the tag you choose and before the close tags.
    ie.
    Lets say you want to insert a new div called #container with a #mainWrap div already on the page.
    "after tag"
    <div id="mainWrap"></div>
    <div id="container"></div>
    as you see it inserts after the closing div tag of #mainWrap
    "after start of tag"
    <div id="mainWrap"><div id="container"></div></div>
    as you see it inserts #container after the start tag and before the close tag of # mainWrap

  • How can i remove text in between the tags

    Hi 
    I want to remove the text inside the xml tags and am failing to do so. i have tried this codding with no results.
    <value>yes</value> = <value></value>
    <value>yes</value> = <value></value>
    <value>yes</value> = <value></value>
    my code:
                    string text = File.ReadAllText(outputFilePath);
                    text = DeleteBetween1(text,"<value>", "</value>");
     public string DeleteBetween(string STR, string FirstString, string LastString)
                string regularExpressionPattern1 = @"(?:\" + FirstString + @")(<^<>+)\<\/" + LastString;
                Regex regex = new Regex(regularExpressionPattern1, RegexOptions.Singleline);
                MatchCollection collection = regex.Matches(STR.ToString());
                var val = string.Empty;
                foreach (Match m in collection)
                    val = m.Groups[1].Value;
                    STR = STR.Replace(val, "");
                return STR;

    hi,
    you can try below.
    https://social.msdn.microsoft.com/Forums/en-US/b9b4d8d6-38ba-4483-abfd-4939aca0593d/how-can-i-extract-text-string-between-two-tags-?forum=csharpgeneral
    hope that helps.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Spacing between jsp struts tags

    I have the following jsp code that contains three buttons and a link to a page.
    The three buttons are located at the end of a jsp form (left-hand-side). I want the link to be located on the right-hand-side bottom of the form, that is I want spacing between the last button and the link. (without spacing between buttons themselves).
    here's the code:
    <tr height="50">
    <td colspan="5">
    <nobr>
    <table>
    <tr>
    <td align="left">
    <html:submit property="submitButton" styleClass="button" value="Get Report" onclick="return(doReportSubmit(document.searchReportForm, 'report', 1));"/>
    <html:submit property="submitButton" styleClass="button" value="Create Spreadsheet" onclick="return(doReportSubmit(document.searchReportForm,'spread', 1));"/>
    <logic:equal scope="session" name="user" property="role" value="administrator">
    <html:submit property="submitButton" value="Edit View" styleClass="button"/>
    </logic:equal>
    <logic:equal scope="session" name="user" property="role" value="administrator">
    <a href="javascript:popUp('pages/searchEngineInfo.htm');"> View Page Info </a>
    </logic:equal>
    </nobr>
    </td>
    </tr>
    </table>
    </td>
    </tr>my three buttons: Get Report, Create Stylesheet, and Edit View
    my link: View Page Info
    Does anybody know how to do this?

    Thank you! I tried your solution and now I almost have what I wanted.
    Only, the link is located on a line after the buttons. Is there any way I can have them on the same line?
    Please help me out.
    Here's what my code looks like now:
    <tr height="50">
    <td colspan="5">
    <nobr>
    <html:submit property="submitButton" styleClass="button" value="Get Report"
    onclick="return(doReportSubmit(document.searchReportForm, 'report', 1));"/>
    <html:submit property="submitButton" styleClass="button" value="Create Spreadsheet" onclick="return(doReportSubmit(document.searchReportForm,'spread', 1));"/>
    <logic:equal scope="session" name="user" property="role" value="administrator">
    <html:submit property="submitButton" value="Edit View styleClass="button" onclick="return(doReportSubmit(document.searchReportForm,'view', 1));"/>
    </logic:equal>
    <logic:equal scope="session" name="user" property="role" value="administrator">
    <span style="float:right"><a href="javascript:popUp('pages/searchEngineInfo.htm');"> View Page Info </a></span>
    </logic:equal>
    </nobr>
    </td>
    </tr>

  • How do I, or can I, do a rollover with, or between, three div tags?

    Dear Dreamweaver forum:
    I am currently using Dreamweaver CS3 on my MacBook Pro.
    I am new to Dreamweaver and have been studying tutorials on Lynda.com at the "essential" level.
    The series of Dreamweaver CS3 videos I have been following on Lynda.com are done by Garrick Chow.
    However, what I still do not know how to do is link a shape to both an image and to text.
    The shape, the image, and the text are all contained within their own div tags.
    Why did I go so "div tag crazy"? It's because I went with what I can understand so far.
    The concept of movable div tags, for me, was both one of the easiest concepts to understand and one of
    the easiest things to create so far in my studies of Dreamweaver CS3.
    Anyway, I think the image below pretty much spells out what I'm looking for
    Any help would be appreciated. Thanks!
    Scott

    You can learn to code, pay the $99 to join the developers program, purchase a Mac if you don't have one (it's required to develop for iOS) and install the correct tools. There are a number of books available on the subject, some in the iBookstore, I'm sure.

  • Gap around div tag

    Hello Dreamweavers.
    Ive made a div tag and Ive centered it in the middle of my page. But on the top there is a gap.
    Ive seen some articles where it says to add:
    margin: 0;
    padding: 0;
    Im doing so, but im still getting that gap on the top.
    this is my CSS
    #box1 {
              background-color: #00F;
              height: 200px;
              width: 600px;
              padding: 0px;
              margin: auto;
    I have margin to Auto in order to center the box, is this correct?, there for I add the 0 padding in order to get rid of the gap.

    You could try adding the following to the top of the CSS
        margin: 0;
        padding: 0;
    or better still, add a normalise script as in
    /*! normalize.css v1.1.1 | MIT License | git.io/normalize */
    /* ==========================================================================
       HTML5 display definitions
       ========================================================================== */
    * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
    article,
    aside,
    details,
    figcaption,
    figure,
    footer,
    header,
    hgroup,
    main,
    nav,
    section,
    summary {
        display: block;
    * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
    audio,
    canvas,
    video {
        display: inline-block;
        *display: inline;
        *zoom: 1;
    * Prevent modern browsers from displaying `audio` without controls.
    * Remove excess height in iOS 5 devices.
    audio:not([controls]) {
        display: none;
        height: 0;
    * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
    * Known issue: no IE 6 support.
    [hidden] {
        display: none;
    /* ==========================================================================
       Base
       ========================================================================== */
    * 1. Prevent system color scheme's background color being used in Firefox, IE,
    *    and Opera.
    * 2. Prevent system color scheme's text color being used in Firefox, IE, and
    *    Opera.
    * 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
    *    `em` units.
    * 4. Prevent iOS text size adjust after orientation change, without disabling
    *    user zoom.
    html {
        background: #fff; /* 1 */
        color: #000; /* 2 */
        font-size: 100%; /* 3 */
        -webkit-text-size-adjust: 100%; /* 4 */
        -ms-text-size-adjust: 100%; /* 4 */
    * Address `font-family` inconsistency between `textarea` and other form
    * elements.
    html,
    button,
    input,
    select,
    textarea {
        font-family: sans-serif;
    * Address margins handled incorrectly in IE 6/7.
    body {
        margin: 0;
    /* ==========================================================================
       Links
       ========================================================================== */
    * Address `outline` inconsistency between Chrome and other browsers.
    a:focus {
        outline: thin dotted;
    * Improve readability when focused and also mouse hovered in all browsers.
    a:active,
    a:hover {
        outline: 0;
    /* ==========================================================================
       Typography
       ========================================================================== */
    * Address font sizes and margins set differently in IE 6/7.
    * Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
    * and Chrome.
    h1 {
        font-size: 2em;
        margin: 0.67em 0;
    h2 {
        font-size: 1.5em;
        margin: 0.83em 0;
    h3 {
        font-size: 1.17em;
        margin: 1em 0;
    h4 {
        font-size: 1em;
        margin: 1.33em 0;
    h5 {
        font-size: 0.83em;
        margin: 1.67em 0;
    h6 {
        font-size: 0.67em;
        margin: 2.33em 0;
    * Address styling not present in IE 7/8/9, Safari 5, and Chrome.
    abbr[title] {
        border-bottom: 1px dotted;
    * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
    b,
    strong {
        font-weight: bold;
    blockquote {
        margin: 1em 40px;
    * Address styling not present in Safari 5 and Chrome.
    dfn {
        font-style: italic;
    * Address differences between Firefox and other browsers.
    * Known issue: no IE 6/7 normalization.
    hr {
        -moz-box-sizing: content-box;
        box-sizing: content-box;
        height: 0;
    * Address styling not present in IE 6/7/8/9.
    mark {
        background: #ff0;
        color: #000;
    * Address margins set differently in IE 6/7.
    p,
    pre {
        margin: 1em 0;
    * Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
    code,
    kbd,
    pre,
    samp {
        font-family: monospace, serif;
        _font-family: 'courier new', monospace;
        font-size: 1em;
    * Improve readability of pre-formatted text in all browsers.
    pre {
        white-space: pre;
        white-space: pre-wrap;
        word-wrap: break-word;
    * Address CSS quotes not supported in IE 6/7.
    q {
        quotes: none;
    * Address `quotes` property not supported in Safari 4.
    q:before,
    q:after {
        content: '';
        content: none;
    * Address inconsistent and variable font size in all browsers.
    small {
        font-size: 80%;
    * Prevent `sub` and `sup` affecting `line-height` in all browsers.
    sub,
    sup {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
    sup {
        top: -0.5em;
    sub {
        bottom: -0.25em;
    /* ==========================================================================
       Lists
       ========================================================================== */
    * Address margins set differently in IE 6/7.
    dl,
    menu,
    ol,
    ul {
        margin: 1em 0;
    dd {
        margin: 0 0 0 40px;
    * Address paddings set differently in IE 6/7.
    menu,
    ol,
    ul {
        padding: 0 0 0 40px;
    * Correct list images handled incorrectly in IE 7.
    nav ul,
    nav ol {
        list-style: none;
        list-style-image: none;
    /* ==========================================================================
       Embedded content
       ========================================================================== */
    * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
    * 2. Improve image quality when scaled in IE 7.
    img {
        border: 0; /* 1 */
        -ms-interpolation-mode: bicubic; /* 2 */
    * Correct overflow displayed oddly in IE 9.
    svg:not(:root) {
        overflow: hidden;
    /* ==========================================================================
       Figures
       ========================================================================== */
    * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
    figure {
        margin: 0;
    /* ==========================================================================
       Forms
       ========================================================================== */
    * Correct margin displayed oddly in IE 6/7.
    form {
        margin: 0;
    * Define consistent border, margin, and padding.
    fieldset {
        border: 1px solid #c0c0c0;
        margin: 0 2px;
        padding: 0.35em 0.625em 0.75em;
    * 1. Correct color not being inherited in IE 6/7/8/9.
    * 2. Correct text not wrapping in Firefox 3.
    * 3. Correct alignment displayed oddly in IE 6/7.
    legend {
        border: 0; /* 1 */
        padding: 0;
        white-space: normal; /* 2 */
        *margin-left: -7px; /* 3 */
    * 1. Correct font size not being inherited in all browsers.
    * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
    *    and Chrome.
    * 3. Improve appearance and consistency in all browsers.
    button,
    input,
    select,
    textarea {
        font-size: 100%; /* 1 */
        margin: 0; /* 2 */
        vertical-align: baseline; /* 3 */
        *vertical-align: middle; /* 3 */
    * Address Firefox 3+ setting `line-height` on `input` using `!important` in
    * the UA stylesheet.
    button,
    input {
        line-height: normal;
    * Address inconsistent `text-transform` inheritance for `button` and `select`.
    * All other form control elements do not inherit `text-transform` values.
    * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
    * Correct `select` style inheritance in Firefox 4+ and Opera.
    button,
    select {
        text-transform: none;
    * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
    *    and `video` controls.
    * 2. Correct inability to style clickable `input` types in iOS.
    * 3. Improve usability and consistency of cursor style between image-type
    *    `input` and others.
    * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
    *    Known issue: inner spacing remains in IE 6.
    button,
    html input[type="button"], /* 1 */
    input[type="reset"],
    input[type="submit"] {
        -webkit-appearance: button; /* 2 */
        cursor: pointer; /* 3 */
        *overflow: visible;  /* 4 */
    * Re-set default cursor for disabled elements.
    button[disabled],
    html input[disabled] {
        cursor: default;
    * 1. Address box sizing set to content-box in IE 8/9.
    * 2. Remove excess padding in IE 8/9.
    * 3. Remove excess padding in IE 7.
    *    Known issue: excess padding remains in IE 6.
    input[type="checkbox"],
    input[type="radio"] {
        box-sizing: border-box; /* 1 */
        padding: 0; /* 2 */
        *height: 13px; /* 3 */
        *width: 13px; /* 3 */
    * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
    * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
    *    (include `-moz` to future-proof).
    input[type="search"] {
        -webkit-appearance: textfield; /* 1 */
        -moz-box-sizing: content-box;
        -webkit-box-sizing: content-box; /* 2 */
        box-sizing: content-box;
    * Remove inner padding and search cancel button in Safari 5 and Chrome
    * on OS X.
    input[type="search"]::-webkit-search-cancel-button,
    input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none;
    * Remove inner padding and border in Firefox 3+.
    button::-moz-focus-inner,
    input::-moz-focus-inner {
        border: 0;
        padding: 0;
    * 1. Remove default vertical scrollbar in IE 6/7/8/9.
    * 2. Improve readability and alignment in all browsers.
    textarea {
        overflow: auto; /* 1 */
        vertical-align: top; /* 2 */
    /* ==========================================================================
       Tables
       ========================================================================== */
    * Remove most spacing between table cells.
    table {
        border-collapse: collapse;
        border-spacing: 0;

Maybe you are looking for