How can I have use the same div ID multiple times on the same page?

Okay so a problem I encounter a lot is that often times I want to use the same div ID several times on the same page. An example of this is when I'm creating table like designs.
Let's say for instance I create a div ID called 'product-container'. I want to use 'product-container' multiple times on the same page but if I do this it is improper XHTML and will throw errors in any XHTML validator (you are only allowed to use a div ID once on any XHTML page in order for it to be standards compliant).
Now the first option is that I could define 'product-container' in my CSS style sheet multiple times by doing something like this...
#product-container {
     width: 300px;
#product-container-2 {
     width: 300px;
#product-container-3 {
     width: 300px;
#product-container-4 {
     width: 300px;
What you will see there however is that it seems pointless to define the same ID numerous times over (just adding a number on the end) when each ID is the exact same thing and has the exact same attributes.
Now what I have noticed is that there are some sites out there who manage to have the same ID appear several times in the code but add a number to it just like above. The difference is that they only have one definition for 'product-cointainer' in their CSS document but in their actual XHTML code they have IDs for 'product-container' but with numbers on the end like 2,3,4,5, etc. It's almost as if JavaScript or some other code is automatically appending a number on the end of the ID so the validator won't consider the markup to be invalid, but yet it knows that it's using the same 'product-container' style that is contained in the CSS style sheet.
I hope I explained this correctly. I'm just hoping to find a way that I can put the same div ID on a page multiple times without having to define it over and over again in my CSS.
Any help is much appreciated!

Because it seems like by using a class you can't make this position as 
well as you can by using an ID. Am I wrong?
An ID name can be used only one time per page.  A class name can be used multiple times per page.
.product {
width: 300px;
text-align:left;
color: #FF0000
border: 2px solid #666;
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media  Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com

Similar Messages

  • How can u have lock rotation off and mute feature off at the same time

    How can u have lock rotation off and mute feature off at the same time

    Maybe this will help. The link at the bottom is the same one that was posted above.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the task bar. Double tap the home button and in the task bar at the bottom, swipe all the way to the right. The speaker icon is all the way to the left. Tap on it and system sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock rotation can be accessed via the task bar in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • How can I sync more than 100 ibooks at one time.  The new IOS killed my legal collection of 4000 books and now I cant sync.

    How can I sync more than 100 ibooks at one time.  The new IOS killed my legal collection of 4000 books and now I cant sync.
    <Edited by Host>

    How can I sync more than 100 ibooks at one time.  The new IOS killed my legal collection of 4000 books and now I cant sync.
    <Edited by Host>

  • Bapi_po_create1 is giving same system messages  multiple time in the joblog

    Hi Experts,
    Bapi_po_create1 is giving same system messages multiple times in the job log when we ran the program in the background
    can u plz suggest how to prevent these multiple appearances of same messages.
    I am pasting the code below whn i ran this program in backgorund job log is having the messages.
    Date       Time     Message text                                                                 Message class Message no. Message type
    08/06/2009 08:11:53 Job started                                                                       00           516          S
    08/06/2009 08:11:53 Step 001 started (program ZZZTEST, variant &0000000000008, user ID BREDDY)        00           550          S
    08/06/2009 08:11:54 Commitment plan contains no account assignment data                              MECP          020          S
    08/06/2009 08:11:54 Commitment plan contains no account assignment data                              MECP          020          S
    08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:54 Source not included in list despite source list requirement                       06           722          E
    08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained                          VH           777          S
    08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained                          VH           777          S
    08/06/2009 08:11:55 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:55 Purchase order still contains faulty items                                       MEPO          000          E
    08/06/2009 08:11:55 Job finished                                                                      00           517          S
    Edited by: bhavani prasad kotharu on Aug 6, 2009 3:09 PM

    HERE IS THE CODE OF THE PROGRAM, WE R JUST PASSING SOME PO DATA TO THE BAPI_PO_CREATE1,ON RUNNING THIS PROGRAM IN BACKGROUND SAME SYSTEM MESSAGES ARE APPEARED MULTIPLE TIMES,----
    REPORT zzztest.
    DATA :    lwa_bapimepoheader TYPE bapimepoheader
             ,lwa_bapimepoheaderx TYPE bapimepoheaderx
             ,li_bapimepoitem TYPE STANDARD TABLE OF bapimepoitem
             ,lwa_bapimepoitem TYPE  bapimepoitem
             ,li_bapimepoitemx TYPE STANDARD TABLE OF bapimepoitemx
             ,lwa_bapimepoitemx TYPE bapimepoitemx
             ,li_conditions TYPE STANDARD TABLE OF komv
             ,li_return TYPE STANDARD TABLE OF bapiret2
             , n TYPE c
    PARAMETERS: p1 TYPE c AS CHECKBOX.
    IF p1 = 'X'.
      lwa_bapimepoheader-doc_type = 'NB'.
      lwa_bapimepoheader-purch_org = 'NA00'.
      lwa_bapimepoheader-pur_group = 'C02'.
      lwa_bapimepoheaderx-doc_type = 'X'.
      lwa_bapimepoheaderx-purch_org = 'X'.
      lwa_bapimepoheaderx-pur_group = 'X'.
      lwa_bapimepoitem-po_item = '10'.
      lwa_bapimepoitem-material = '000000000000020111'.
      lwa_bapimepoitem-plant = 'CA01'.
      lwa_bapimepoitem-vend_mat = '1000'.
      lwa_bapimepoitem-quantity = '10'.
      lwa_bapimepoitem-orderpr_un = 'M'.
      lwa_bapimepoitem-no_more_gr = 'K'.
      lwa_bapimepoitem-agreement = '4600000095'.
      lwa_bapimepoitem-agmt_item = '10'.
      lwa_bapimepoitem-pricedate = 'X'.
      lwa_bapimepoitem-price_date = '20071030'.
      lwa_bapimepoitem-no_rounding = 'X'.
      APPEND lwa_bapimepoitem TO li_bapimepoitem.
      lwa_bapimepoitemx-po_item = '10'.
      lwa_bapimepoitemx-po_itemx = 'X'.
      lwa_bapimepoitemx-po_itemx = 'X'.
      lwa_bapimepoitemx-material = 'X'.
      lwa_bapimepoitemx-plant = 'X'.
      lwa_bapimepoitemx-quantity = 'X'.
      lwa_bapimepoitemx-po_unit = 'X'.
      lwa_bapimepoitemx-orderpr_un = 'X'.
      lwa_bapimepoitemx-acctasscat = 'X'.
      lwa_bapimepoitemx-agreement = 'X'.
      lwa_bapimepoitemx-agmt_item = 'X'.
      lwa_bapimepoitemx-pricedate = 'X'.
      lwa_bapimepoitemx-price_date = 'X'.
      lwa_bapimepoitemx-preq_no = 'X'.
      lwa_bapimepoitemx-preq_item = 'X'.
      lwa_bapimepoitemx-no_rounding = 'X'.
      APPEND lwa_bapimepoitemx TO li_bapimepoitemx.
    DATA: lo_msg_handler  TYPE REF TO cl_message_handler_mm.
      CALL METHOD cl_message_handler_mm=>get_handler
        IMPORTING
          ex_handler = lo_msg_handler.
      lo_msg_handler->remove_all( ).
      lo_msg_handler->cleanup( ).
      CALL FUNCTION 'BAPI_PO_CREATE1' "in background task
           EXPORTING
             poheader   = lwa_bapimepoheader
             poheaderx  = lwa_bapimepoheaderx
             testrun    = 'X'
           NO_MESSAGING = c_x
           NO_MESSAGE_REQ = c_x
             no_authority = 'X'
           IMPORTING
             expheader  = lwa_bapimepoheader
           TABLES
             return     = li_return
             poitem     = li_bapimepoitem
             poitemx    = li_bapimepoitemx
             conditions = li_conditions.
    ENDIF.
    Edited by: bhavani prasad kotharu on Aug 6, 2009 3:38 PM

  • How can I have two different windows up on one screen at the same time?

    How can I have to different windows open on my screen at one time? Kind of like a split or shared screen.

    If you want this split screen thingy for a single app, do like captfred suggests or see if the app itself supports some sort of splitting, like MS Excel.
    If you want to do this system-wide, maybe you can get what you want by activating and using Spaces: http://support.apple.com/kb/PH4313

  • TS2755 keep receiving the same text message multiple times, at the same time of the night. How can I stop this?Thabnks

    Hi
    I keep on receiving the same text message multiple times and at around the same time each night. Any idea how I can stop this happening? The text messages are originating from to separate Saudi Arabian mobile numbers. Both these people are listed in my contacts so do you think if I delete their names it might stop the texts coming htrough each night?
    Cheers

    Deleting the people from your contacts will not stop the messages. Have you tried talking to the people and finding out if they're sending you messages? You could try contacting your carrier and finding out what blocking services they offer. However, theat would block all messages from those people.

  • How can I have links within emails read with Seamonkey open on the default Firefox browser and not the Seamonkey browser?

    I use the SeaMonkey 2.0 mailer for my email client and Firefox 3.6 for my default browser. A link embedded in an email (read with SeaMonkey) opens the SeaMonkey browser and not Firefox. How can I have it open on Firefox?
    (SeaMonkey is not set up as the default browser and Firefox is.)

    See here
    *https://support.mozilla.org/en-US/kb/how-make-web-links-open-firefox-default

  • Namedquery using same table field multiple times with the use of a label

    Hi all,
    i'm having some trouble with a namedquery. I'm trying to
    use the following namedquery in Toplink to retrive some
    data out of a database.
    select proj.id
    , proj.code
    , proj.name
    , proj.budget
    , proj.status
    , proj.startdate
    , proj.enddate
    , proj.mdr_id projleader_id
    , med_leader.name projleader
    , proj.mdr_id_valt_onder promanager_id
    , med_promanager.name promanager
    , proj.mdr_id_is_account_from accmanager_id
    , med_accmanager.name accmanager
    from uur_projecten proj
    , uur_medewerkers med_leader
    , uur_medewerkers med_promanager
    , uur_medewerkers med_accmanager
    where ( #p_name is not null or #p_search_string is not null )
    and med_leader.id = proj.mdr_id
    and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
    and (( #p_status is not null
    and substr( proj.status, 1, 1 ) = upper( #p_status ))
    or ( #p_status is null ))
    and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
    or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
    and med_promanager.id = proj.mdr_id_valt_onder
    and med_accmanager.id = proj.mdr_id_is_account_van
    order by decode( substr( proj.status, 1, 1 )
    , 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
    As you all can see the table ‘uur_medewerkers’ is been used trice to
    determine the name for the corresponding ID. I have a Java class with
    the fields for the results and created a Toplink descriptor to map
    the fields to the database fields.
    The problem is that for the 'projleader', 'promanager' and 'accmanager'
    fields the results are null. The reason is probably that Toplink doesn't
    recognize the fields because of the label for the tables.
    Is there a way to make this work?
    Greets, René

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

  • How can we have a column having text and radio button in the same line?

    Hi,
    I have a column which needs to have data with a radio button. Was able to achieve this by using <trh:tableLayout>. But when i select the radio button it shifts to the next line. Want to stop this behavior of radio button of shifting to the next line. This column also includes a hyperlink.So the text and hyperlink are made visible invisible based on radio button action.
    Adding one more doubt. Can a particular columns horizontalgrid can be made invisible?
    Any help would be appreciated.
    sample code:
    <trh:cellFormat id="cf8" halign="start">
    <af:activeOutputText value="#{row.Actions}" id="aot2"/>
    <af:goLink text="#{row.Actions}" id="gl1"
    clientComponent="true" visible="false"
    targetFrame="_blank" destination="http:// + #{row.BUTTON_URL}">
    </af:goLink>
    <af:selectBooleanRadio text="" id="sbr1">
    <af:clientListener method="selectCheckBox" type="click"/>
    </af:selectBooleanRadio>
    </trh:cellFormat>
    Thanks,
    Nita

    Remove the <trh:> components. Put the other components as direct children of the PanelGroupLayout:
    <af:column id="c2" headerText="Actions">
      <af:panelGroupLayout id="pgl6" layout="horizontal">
        <af:activeOutputText value="#{row.Actions}" id="aot2"/>
        <af:goLink text="#{row.Actions}" id="gl1"
                   clientComponent="true" visible="false"
                   targetFrame="_blank" destination="http:// + #{row.BUTTON_URL}">
        </af:goLink>
        <af:selectBooleanRadio text="" id="sbr1">
          <af:clientListener method="selectCheckBox" type="click"/>
        </af:selectBooleanRadio>
      </af:panelGroupLayout>
    </af:column>If you need to add some horizontan space between the components, you can put <af:spacer>(s) between the components.
    Dimitar

  • HT1430 I already own an iPhone & have purchased and iPod touch for my husband. How can I have a  completely separate Apple ID for both of the devices?

    I have purchased an iPhone 4s 2 years ago and recently purchased an iPod touch for my husband while he was abroad working. I used the same Apple ID when setting up the iPod touch but now I want to know how I can have two separate Apple IDs. One for his iPod touch and one for my iPhone?

    Create a new ID and start using it.
    You will not be able to transfer your existing purchases and updates will require knowing the password for the old ID.

  • How can i have bookmarks automatically in a new tab rather than the tab i am in when i select a bookmark?

    How can I get book marks to automatically open in a new tab rather than the tab I am in when I select the bookmark?

    It would be good if this was made a user-defined Option (Tools -> Options -> Tabs) in the next update of Firefox rather than having to install an add-on. I currently keep Firefox open to view my Accuweather.com add-on running or because I know that I will be returning to Firefox in short order. (I do close Firefox if I have visited a sensitive or secure site to ensure better security.) Every time I want to go to a bookmark, I must open a new "(Untitled)" tab before selecting my bookmark using the keyboard (I'm a dedicated keystroker; it's much faster for me). This way, when I close the website, I have an "(Untitled)" tab displaying so that Firefox doesn't close. Why can't I set an Option parameter that will result in me not having to go through this? Alternatively, allow users to set an option to keep Firefox loaded and open in the event only one tab is open and maybe if only one Firefox application window is running (I avoid having more than one Firefox window open as much as possible). I've addressed this last issue in the past but have seen no change when one closes the last tab in a Firefox window. As general practice, I would think that Firefox would run better if options, like I have described above, were part of the Firefox application code and not given to needing an add-on which may cause instability in Firefox as they have in the past, even with author verification and certification.

  • How can I have a newsletter I created in PDF appear in the body of an email I send, rather than attach it.

    How can I get a newsletter created in PDF format to appear in the body of an email I send, rather than attach it.

    You cannot. (A few email programs might show it automatically; you cannot stop that either).

  • How can I have mutiple bookmarks toolbars? Not multiple row. Multiple toolbars. With different names.

    I just want multiple bookmark toolbars.
    Right click the ui, choose a toolbar (e.g. "Work", "Visuals") etc.
    That's it.
    Not multiple rows.
    Thanks.

    That is not possible.
    Firefox only has one Bookmarks Toolbar item that can hold the bookmarks.
    So you can only use an extension that supports multiple bookmarks rows to add an extra row if the current last one gets filled up.
    The best workaround is probably to create bookmarks folders on the bookmarks toolbar and open those to access each category.
    *https://support.mozilla.org/kb/Bookmark+folders

  • Reusing the same jsp include multiple times on the same page

    If someone knows a way out of this
    I'd like to print out 2 records of the same data type I have a JSP include which does that.
    Now my issue is how to use the same include twice on the same page
    Ideally I would like to do the following:
    <%
    request.setAttribute("person", person1);
    %>
    <jsp:include page="./person.jsp"/>
    <%
    request.setAttribute("person", person2);
    %>
    <jsp:include page="./person.jsp"/>
    And in person.jsp
    I could have
    <h:inputText name=#{person.name}/>
    This fails in the updateModel phase - And I realize why it's failing. There really is no person managed bean.
    It's just that I am at a kind of loss as to what I need to do now -
    Am missing something or is it just impossible to use jsp:includes the way Ive tried to?

    I do not understand, have you created a backing bean named person? Have you defined it in your config file?
    Please copy/paster your backing bean code and config file.
    Normally, you can set directly the value of the bean by using some java code in your jsp instead of setting the request attribute.

  • How can I return to a previous version of Numbers? Or how can I have all my sheets show on a column on the left hand side, as in the previous version?

    I updated my Numbers for Mac only to find out that there are several changes that make it less appealing for me so far (and I don't think it's only the learning curve). Questions: a) can I somehow edit the location of where I can find all the sheets (right now they are on top of the page, and you can't see all of them listed at quick glance but must scroll/arrow through them) I have in that spreadsheet? In the previous version they were all easy access on the left hand side.
    Or b) can one go back to a previous version of a program somehow?
    Thank you for any leads/answers!
    L

    can I somehow edit the location of where I can find all the sheets (right now they are on top of the page, and you can't see all of them listed at quick glance but must scroll/arrow through them)
    On my machine I just hit shift-command-j (the keyboard shortcut I assigned in System Preferences) and a list of the sheets in the current document pops up:
    I type a number from the list and jump immediately to that sheet. The hands never have to leave the keyboard.
    (This particular document had a sheet named for each month.  But the sheets in your document automatically will be listed instead.)
    This is done via a Jump to Sheet Automator Service (Dropbox download).  To install just doubleclick the .workflow package and (if needed) click 'Download Anyway' in System Preferences > Privacy & Security.
    Installation will cause a new item to appear in your Numbers > Services menu.  Then, if you want a keyboard shortcut, go here in System Preferences and add one:
    You can rename or remove the service by holding down the option key in Finder and choosing Go > Library > Services. You can also view the AppleScript contaned within the service by opening the .workflow package in Automator.
    Note, also, that in Numbers 3 you don't have to use those left-right arrows upper right to slowly scroll left-right to the sheets that are out of view.  Just move your cursor up to the "band" with the "tabs" and drag left or right.  That's much faster than using the arrows.
    SG

Maybe you are looking for

  • Firewire to VCR & HDD

    My old 17" MBP had both FW800 and 400 ports, though I think it only had one FW bus. This meant I could connect an external drive to the 800 port and a VCR or Camcorder to the 400 port at the same time. The new 17" MBP only has one FW800 port. The ext

  • Syncing ipad and ihpone

    I have an iphone and an ipad. How do I sync the calendars on each.  I have mobile me.

  • GR Processing Time and Delivery Time not coming in CS11 Output screen

    Hi, I am executing a BOM explosion report using CS11. In the CS11 report output I added columns for GR Time and Delivery Time using change layout option. After changing layout when I see the details in columns of GR Time and Delivery Time all the val

  • How to do deep reset on NOKIA E5-00.? (*)+(3)+(Cal...

    what are the keys to do a hard reset on Nokia E5-00? The default shortcut *+3+Green is not working...

  • Install Database Webtool Software

    I'm installing NW2004s Preview. I encounter the following Error during Install Database Webtoll software: ERROR 2010-07-29 18:35:33 FSL-06002  Error 1060 (The specified service does not exist as an installed service. ) in execution of a 'OpenService'