locked
Avoid space between tag elements of my html page RRS feed

  • Question

  • User1991482975 posted

    Hi, i have some code html :

    <div class="_style_3O2TtY" data-reactid="145">
                                                                                <div class="_style_31RGeY" aria-hidden="true" data-reactid="146">
                                                                                    <div class="_style_2SK1zv" data-reactid="147">
                                                                                        <div class="_style_2gJSG2" data-reactid="148">
                                                                                            <a class="_style_21oTCt" href="/fr/ride/">
                                                                                                <!-- react-text: 1162 -->Aperçu<!-- /react-text -->
                                                                                            </a>
                                                                                        </div>
                                                                                        <div class="_style_2gJSG2" data-reactid="151"><a class="_style_21oTCt" href="/fr/ride/how-uber-works/"><!-- react-text: 1164 -->Fonctionnement<!-- /react-text --></a></div>
                                                                                        <div class="_style_2gJSG2" data-reactid="154"><a class="_style_21oTCt" href="/fr/fare-estimate/"><!-- react-text: 1166 -->Outil d'estimation des prix<!-- /react-text --></a></div>
                                                                                        <div class="_style_2gJSG2" data-reactid="157"><a class="_style_21oTCt" href="/fr/ride/safety/"><!-- react-text: 1168 -->Sécurité<!-- /react-text --></a></div>
                                                                                        <div class="_style_2gJSG2" data-reactid="160"><a class="_style_21oTCt" href="/fr/cities/"><!-- react-text: 1170 -->Villes<!-- /react-text --></a></div><div class="_style_2gJSG2" data-reactid="163"><a class="_style_21oTCt" href="/fr/airports/"><!-- react-text: 1172 -->Aéroports<!-- /react-text --></a></div><div class="_style_2gJSG2" data-reactid="166"><a target="_blank" href="/business?mainSite=true" class="_style_21oTCt"><!-- react-text: 1174 -->Uber for&nbsp;Business<!-- /react-text --></a></div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>

    if i put all the div one after the other, without spacing between them all works fine..

    but if i decide to order them as i did above the browser take the space between my tag as a real spaces... and the layour change...

    how to avoid this?

    Thursday, April 19, 2018 9:05 AM

All replies

  • User516094431 posted

    grafic.web

    i did above the browser take the space between my tag as a real spaces.

    It's working fine. I copied pasted your code and align using CTRL + K + D. No extra space is showing also no need to use &nbsp; just use space.

    Check following line of code:

    <div class="_style_3O2TtY" data-reactid="145">
            <div class="_style_31RGeY" aria-hidden="true" data-reactid="146">
                <div class="_style_2SK1zv" data-reactid="147">
                    <div class="_style_2gJSG2" data-reactid="148">
                        <a class="_style_21oTCt" href="/fr/ride/">
                            <!-- react-text: 1162 -->
                            Aperçu<!-- /react-text -->
                        </a>
                    </div>
                    <div class="_style_2gJSG2" data-reactid="151">
                        <a class="_style_21oTCt" href="/fr/ride/how-uber-works/">
                            <!-- react-text: 1164 -->
                            Fonctionnement<!-- /react-text -->
                        </a>
                    </div>
                    <div class="_style_2gJSG2" data-reactid="154">
                        <a class="_style_21oTCt" href="/fr/fare-estimate/">
                            <!-- react-text: 1166 -->
                            Outil d'estimation des prix<!-- /react-text -->
                        </a>
                    </div>
                    <div class="_style_2gJSG2" data-reactid="157">
                        <a class="_style_21oTCt" href="/fr/ride/safety/">
                            <!-- react-text: 1168 -->
                            Sécurité<!-- /react-text -->
                        </a>
                    </div>
                    <div class="_style_2gJSG2" data-reactid="160">
                        <a class="_style_21oTCt" href="/fr/cities/">
                            <!-- react-text: 1170 -->
                            Villes<!-- /react-text -->
                        </a>
                    </div>
                    <div class="_style_2gJSG2" data-reactid="163">
                        <a class="_style_21oTCt" href="/fr/airports/">
                            <!-- react-text: 1172 -->
                            Aéroports<!-- /react-text -->
                        </a>
                    </div>
                    <div class="_style_2gJSG2" data-reactid="166">
                        <a target="_blank" href="/business?mainSite=true" class="_style_21oTCt">
                            <!-- react-text: 1174 -->
                            Uber for Business<!-- /react-text -->
                        </a>
                    </div>
                </div>
            </div>
        </div>

    Thursday, April 19, 2018 9:27 AM
  • User1568384800 posted

    Is there an ending div tag missing from what you've pasted or the page itself?

    Thursday, April 19, 2018 9:27 AM
  • User-1838255255 posted

    Hi grafic.web,

    According to your description and code, i copy your code and test it in my side, here is test result: 

     

    I think this result is working, so i am not clear your issue or your needs, I hope you could give us a detailed description of your issue, this could better help you solve the problem. 

    Or show your needs or issue with image format! 

    Best Regards,

    Eric Du  

    Friday, April 20, 2018 6:05 AM