0

This is my page

My css for the above web page looks fine on browsers on the desktop, however, on mobile browsers the border around the food ingredients are displayed incorrectly:

Relevant CSS :

.page_title {
  text-transform:capitalize;
  text-align:center;
}
.food_list {
  text-transform:capitalize;
}

.listing {
  text-indent:10px;
  margin-right:1500px;
  margin-left:10px;
  color:black;
  background-color:lightblue;
  border-radius: 10px 20px 30px 40px;
  -moz-border-radius: 10px 20px 30px 40px;
  -webkit-border-radius: 10px 20px 30px 40px;
  -khtml-border-radius: 10px 20px 30px 40px;
}

.ul {
  list-style:none;
}

p {
  text-transform:none;
}

p span {
  display:block;
}
3
  • 3
    remove margin-right:1500px;, and what your mean about "displayed incorrectly" ? Commented Nov 24, 2013 at 5:38
  • The reason why I had margin-right:1500px is so that on a pc browser, the box would not stretch across the whole screen. How could I just have the box just surround the ingredients section on both the pc and mobile browsers?? Commented Nov 24, 2013 at 6:08
  • You can also refer to CSS3's media query features here That can ensure your desired size for both desktop and mobile browsers. Commented Nov 24, 2013 at 7:24

1 Answer 1

1

try this:

jsFiddle

.listing {
    text-indent: 10px;
    margin-left: 10px;
    color: black;
    float: left;
    background-color: lightblue;
    border-radius: 10px 20px 30px 40px;
    -moz-border-radius: 10px 20px 30px 40px;
    -webkit-border-radius: 10px 20px 30px 40px;
    -khtml-border-radius: 10px 20px 30px 40px;
}

h2{
    clear:both;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.