remove white border around div


Joris

I'm trying to create a page that detects if a mobile device is in portrait mode. The function seems to be working fine, but there is a problem with the layout.
I always get a white border around my div tags, but can't seem to figure out where it comes from. I checked the developer tools and found nothing. Setting the border to 0 doesn't work either. Try it with overflow: hidden, nada.

http://jsfiddle.net/6c4e00x0/4/

HTML

<div id="modal">
    <div>
        <div id="icon">
            <img id="rotate" />
        </div>

        <div id="msg"> 
            <a id="close" href="#">close</a>
        </div>
    </div>
</div>

CSS

#rotate {
    width:100%;
    height:300px;
    background:url("http://m.campolympia.com/assets/mobile/site-images/icon-horizontal.png") center center no-repeat;
}

#msg{
    position:relative;
    width:100%;
    text-align:center;
}

a {
    color:white;
}
rosy

Use imgincorrectly. Replace imgwith div.

imgShould work with images:

<img src="smiley.gif" />

JSFiddle

NOTE: Anyone who sees the red pages has a window that is too big or too small, jQuery is what's causing it.

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.6);
}
body {
  min-height: 100%;
  background-color: red;
}
a {
  color: white;
}
#msg {
  position: relative;
  width: 100%;
  text-align: center;
}
#rotate {
  width: 100%;
  height: 300px;
  background: url("http://m.campolympia.com/assets/mobile/site-images/icon-horizontal.png") center center no-repeat;
}
img {}
<div id="modal">
  <div>
    <div id="icon">
      <div id="rotate"></div>
    </div>
    <div id="msg"> <a id="close" href="#">close</a>

    </div>
  </div>
</div>
<div id="content"></div>


Since people can't seem to see it, here's my before and after fix.

forward

As you can see, there is a boundary like the OP said.

back

Now we'll imgchange to divso that it displays correctly. Borderless.

Related


remove white border around div

Joris I'm trying to create a page that detects if a mobile device is in portrait mode. The function seems to be working fine, but there is a problem with the layout. I always get a white border around my div tags, but can't seem to figure out where it comes fr

Remove the white border around the fragment

tooth I have a problem when trying to display a listview in a fragment, there seems to be a white border around the fragment. I also have a similar list view displayed in the activity which exactly matches the border of the screen. I will post below the xml fi

Remove the white border around the fragment

tooth I have a problem when trying to display a listview in a fragment, there seems to be a white border around the fragment. I also have a similar list view displayed in the activity which exactly matches the border of the screen. I will post below the xml fi

Remove the white border around the fragment

tooth I have a problem when trying to display a listview in a fragment, there seems to be a white border around the fragment. I also have a similar list view displayed in the activity which exactly matches the border of the screen. I will post below the xml fi

Remove the white border around the fragment

tooth I have a problem when trying to display a listview in a fragment, there seems to be a white border around the fragment. I also have a similar list view displayed in the activity which exactly matches the border of the screen. I will post below the xml fi

Remove white border around object label

Cameron Gilbert I'm currently looking for a way to remove the thin white border around object labels...here's the code and what I've tried .hr-ob { background-color: #003262; width: 50px; height: 10px; border: none; out

Remove white border around surface view

username I have a surface view inside a relative layout. I want the Surfaceview to cover the whole screen, but it has a white border around it. How can i remove that border. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:t

Remove white border around object label

Cameron Gilbert I'm currently looking for a way to remove the thin white border around object labels...here's the code and what I've tried .hr-ob { background-color: #003262; width: 50px; height: 10px; border: none; out

Remove white border around surface view

username I have a surface view inside a relative layout. I want the Surfaceview to cover the whole screen, but it has a white border around it. How can i remove that border. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:t

How to remove white margin around div tags?

its ADZZ So, I've been creating a very basic website header, nav, the main container and footer. I use markup viewporton my website . My problem occurs when I set widththe divs to 100%. Here is my code: #header { background-color: black; color: white; te

How to remove white margin around div tags?

its ADZZ So, I've been creating a very basic website header, nav, the main container and footer. I use markup viewporton my website . My problem occurs when I set widththe divs to 100%. Here is my code: #header { background-color: black; color: white; te

There is a white border around the video

username I can't get rid of the top and bottom white borders of the video. The video is set to width: 100%; so there are no borders on the left and right. When I set *(universal size) with margin : 0; everything collides together, even the two cards (kartica a

white border around the image

loomanleet Currently I'm working on a website and I've been struggling with background images for a while now. I think it might be caused by the sidebar (the first website I created had a sidebar). Now, for some odd reason, it has a white border around it. Her

There is a white border around the video

username I can't get rid of the top and bottom white borders of the video. The video is set to width: 100%; so there are no borders on the left and right. When I set *(universal size) with margin : 0; everything collides together, even the two cards (kartica a

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove white border around image in mobile view?

ZACK_G In my blog post, I uploaded some images and used CSS code to remove the white box borders that formed around the images on the desktop version. But I can't remove the white box border formed around the image in the mobile version. Suggest any suitable s

How to remove white dotted border around focus button text

Roland HSR I need but can't remove the white dotted border around the focus button text. After reading the article on "Remove white borders (especially dashed borders around links? and inside links)", I tried several solutions to disable outlines like "outline

How to remove white border around image in mobile view?

ZACK_G In my blog post, I uploaded some images and used CSS code to remove the white box borders that formed around the images on the desktop version. But I can't remove the white box border formed around the image in the mobile version. Suggest any suitable s

How to remove white border around image in mobile view?

ZACK_G In my blog post, I uploaded some images and used CSS code to remove the white box borders that formed around the images on the desktop version. But I can't remove the white box border formed around the image in the mobile version. Suggest any suitable s

How to remove white border around image in mobile view?

ZACK_G In my blog post, I uploaded some images and used CSS code to remove the white box borders that formed around the images on the desktop version. But I can't remove the white box border formed around the image in the mobile version. Suggest any suitable s

How to remove white dotted border around focus button text

Roland HSR I need but can't remove the white dotted border around the focus button text. After reading the article on "Remove white borders (especially dashed borders around links? and inside links)", I tried several solutions to disable outlines like "outline

How to remove white dotted border around focus button text

Roland HSR I need but can't remove the white dotted border around the focus button text. After reading the article on "Remove white borders (especially dashed borders around links? and inside links)", I tried several solutions to disable outlines like "outline

How to remove white border around image in mobile view?

ZACK_G In my blog post, I uploaded some images and used CSS code to remove the white box borders that formed around the images on the desktop version. But I can't remove the white box border formed around the image in the mobile version. Suggest any suitable s

How to remove white border around image in mobile view?

ZACK_G In my blog post, I uploaded some images and used CSS code to remove the white box borders that formed around the images on the desktop version. But I can't remove the white box border formed around the image in the mobile version. Suggest any suitable s

Cardview - white border around card

method I'm using cardview as the root of a custom view I've written. I am using v7 support library. My XML looks like this: <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/and