Has anyone seen this particular message that I get in visual studio?
Element 'div' cannot be nested within element 'p'.
I've never tried nesting a
I've never tried nesting a div inside of a paragraph before.. so no. Is there a reason you need a div nested inside of a paragraph?
You can put a paragraph
You can put a paragraph inside a div or a span inside a paragraph, but you can't put a div in a paragraph.
I see. I am working in a
I see. I am working in a stylesheet developed by someone else and since I am using ASP with a contentplaceholder but all I see are a few "
" above in the code.
I've gotten by that bump and
I've gotten by that bump and see what is causing my problem. I have span rule in my sheet that is affecting my spans in question. If I remove the rule all is fine but it screws up older spans. What to do?
HomerSimpson wrote:What to
What to do?
Post all your code - HTML & CSS.
Basically I have this in my
Basically I have this in my css stylesheet which handles my already established spans
span
{
color:blue;
left:15%;
top:45px;
width:40%;
float:left; }
but I now have additional span tags but I don't want them to be influenced by the above CSS.
I'm going to go out on a
I'm going to go out on a limb here and say that what you just posted is probably not all of your code lol.. post all of your code, and you will get more help.
There may be other things that factor into your issue, that we won't see unless we have all of your code.
ok, but it's a
ok, but it's a mess.
CSS
.mytable { width: 96%; } .mydetailsview1{ width: 50%; height: 87%; } .myinputbx {background-color: gray; border: 0.5pt solid #000000; border-collapse: collapse; border-spacing: 0; font-size: 10pt; height: 12.5pt; line-height: 10pt; margin: 0; padding: 0 0 -2.5pt 0; width: 0.75in; z-index: 1; clear: left;} .input {background-color: gray; border: 0.5pt solid #000000; border-collapse: collapse; border-spacing: 0; font-size: 10pt; height: 12.5pt; line-height: 10pt; margin: 0; padding: 0 0 -2.5pt 0; width: 0.75in; z-index: 1; clear: left;} span { color:blue; left:15%; top:45px; width:40%; float:left; } input { background-color: white; } bodys { background-color: gray; text-align: center; min-width: 600px; } div.pre-head{ width: 692px; float: left; padding: 2px; height: 28px; margin: 15px 4px 0; font-size:small; background-color : white; padding-left:25px; } div.a {width: 280px; float: left; padding: 2px; height: 48px; margin: 15px 4px 0; background-color: white; } form div.b {width: 280px; float: left; padding: 2px; height: 48px; margin: 15px 4px 0; background-color : white; } form div.c {width: 280px; float: left; padding: 2px; height: 48px; margin: 15px 4px 0; background-color : white; } form div.d{ width: 280px; float: left; padding: 2px; height: 48px; margin: 15px 4px 0; background-color : white; } form div.e{ width: 280px; float: left; padding: 2px; height: 48px; margin: 15px 4px 0; background-color : white; } form div.f{ width: 272px; float: left; padding: 2px; height: 58px; margin: 15px 4px 0; font-size:small; background-color : white; } form div.g{ width: 280px; float: right; background-color : white; top:10px; height:100px; width:200px } .ddlist1 {float: left; font-family: verdana; } .ddlist2 {background-color : white; font-family: verdana; float: left;} .chkb1 { clear: right; height:33; } .spec_lab { clear: right; height:33; color : blue; width:133px; } .spec_lab2{ float:left; height:222; font-size:medium; color : blue; width:93px; } .first-txt { top:82%; left:13%; float:right; height:222; font-size:small; color : red; width:259px; border-style: solid; background-color: orange; } .second-txt {float:left; height:222; font-size:medium; color : red; width:123px; right:20px; position:relative; top:0; left:1; } .butt1{ Height:47px; width:100px; background: #E0E0E0; } .456, span { position:absolute; text-align:center; width:77%; top:90%; left:35%; border-style:none; background-color:#0077CC; visibility:visible; height:6%; } .456box { position:absolute; text-align:center; width:37%; top:95%; left:25%; border-style: solid; background-color: purple; visibility:visible; } .eculab, span {border-style:hidden; background:inherit; color:white; visibility:visible; position:absolute; width:37%; top:85%; left:5%; }
MARKUP
-----------------------------------------
<head runat="server"> <title>ECU Search</title> </head> <asp:Label ID="Label3" runat="server" Style="z-index: 100; left: 568px; position: absolute; top: 552px" Text="Doc nbr" Height="16px" Width="88px"></asp:Label> <asp:Label ID="Label1" runat="server" Style="z-index: 101; left: 192px; position: absolute; top: 552px" Text="Acct #" Width="79px"></asp:Label> <asp:Label ID="Label2" runat="server" Style="z-index: 102; left: 384px; position: absolute; top: 552px" Text="Noun" Height="24px" Width="72px"></asp:Label> <asp:TextBox ID="TextBox1" runat="server" Style="z-index: 104; left: 160px; position: absolute; top: 576px" Width="84px" Height="24px"></asp:TextBox> <asp:TextBox ID="TextBox2" runat="server" Style="z-index: 105; left: 352px; position: absolute; top: 576px" Height="24px"></asp:TextBox> <asp:TextBox ID="TextBox3" runat="server" Style="z-index: 106; left: 560px; position: absolute; top: 576px" Width="122px" Height="24px"></asp:TextBox> <asp:Button ID="Button1" runat="server" Style="z-index: 107; left: 432px; position: absolute; top: 664px" Text="Submit" Height="50px" Width="111px" /> <asp:Label ID="Label7" runat="server" Style="z-index: 111; left: 184px; position: absolute; top: 624px" Text="Asset code" Width="72px"></asp:Label> <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" Style="z-index: 112; left: 176px; position: absolute; top: 648px" DataTextField="assets_cod" DataValueField="assets_cod"> </asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringSANR %>" ProviderName="<%$ ConnectionStrings:ConnectionStringSANR.ProviderName %>" SelectCommand=""> </asp:SqlDataSource> <span class="456"> <asp:Label ID="Label4" runat="server" Text="Primary Nsn" Width="99px"></asp:Label> <asp:Label ID="Label5" runat="server" Text="Label nbr" Height="24px" Width="88px"></asp:Label> <asp:Label ID="Label6" runat="server" Text="Part nbr" Height="16px" Width="56px"></asp:Label> <br /> </span> <div class="456box"> <asp:TextBox ID="TextBox4" runat="server" ></asp:TextBox> <asp:TextBox ID="TextBox5" runat="server" ></asp:TextBox> <asp:TextBox ID="TextBox6" runat="server" ></asp:TextBox> </div> <br /> <br /> <br /> <div class="ECULAB"> <asp:Label ID="Label12" runat="server" Font-Bold="True" Text="Equipment Queries"></asp:Label> </div> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> </asp:Content>
Please post the code from
Please post the code from the browser (view source & copy), not the server-side code, and please use code tags.
Here is the "VIEW
Here is the "VIEW SOURCE"
but again, I just want to know how to have some spans follow one rule and other spans to follow another. Any element for that matter.
LMCA NEWS
Fiscal Year Countdown
Credit Card Purchases
Effective immediately, the micro purchase threshold is $3,000. Therefore, the credit
More.....
ECU Search
Doc nbr
Acct #
Noun
Asset code
ALL
CANCELED
DEPLOYED
DIRECT_PROC
GFE
HAND_RECEIPT
INV_ADJ
IN_WORK
NON_EAID
ON_HAND
TURN_IN
Primary Nsn
Label nbr
Part nbr
Home
BenchStock
Queries
Purchase Queries
Equipment
Queries
Contact Us
Notice and Consent Statement
Webmaster
Tyssen asked you to use the
Tyssen asked you to use the code tag. It's right there at the top of the editor, so all you have to do is highlight some text and then click on the code icon at the top of the editor. Guess what it is for...
Now the question is, are you just a bad listener or can you really not figure out how to use that tag? If the former, it's time to learn how to listen, if the latter, then if you can't figure out a straightforward on screen editor how are you going to be able to cope with html and CSS?
This thread is out of
This thread is out of control.
sorry, fairly new to this
sorry, fairly new to this forum. What benefit does the code tag do? Am I suppose to put my code ,like this, between the codeTags?
sorry, fairly new to this
sorry, fairly new to this forum. What benefit does the code tag do? Am I suppose to put my code ,like this, between the codeTags?
The code tags preserve code
The code tags preserve code formatting and make it easier to read the code, and yes you have used them correctly in you last example.
Now to stop the thread running off the rails: To answer the remaining question if you need to enusre that an element such as a span doesn't receive styles when you don't want it to you have two choices
1/ use descendent styling to apply styles only to the span that you intend e.g:
#sidebar p span {color:red} <div id="sidebar"> <p><span>spanned text</span></p> </div> <div id="content"> <p><span>this text is not red but browser default</span></p> </div>
2/ use class tokens to add the styles specifically to the span element that you want styled, ensuring that it is only those that receive the special styling
I've been only using
I've been only using .classes in my stylesheets thus far, no ID's until I saw your example.