I have the below set of code. It works fine in most browsers. But I noticed on my main Galaxy S5 browser (which I'm sure affects other browsers also), the two images run off the page. I would appreciate any help. I know the answer may be simple, but after trying a 100 things over a few days, I believe I just have an unnecessary value somewhere and I accidentally merged two solutions.
Thanks,
.arrow {
width: 21px;
height: 57px;
}
.pagination {
max-width: 100%;
}
.pagination_sub {
width: 700px;
height: 57px;
margin: auto;
display: flex;
align-items: center;
}
.pagination_pre {
width: 410px;
height: 57px;
}
.greypagination {
width: 33px;
height: 57px;
}
.prearrow {
width: 12px;
height: 57px;
}
.prepagination {
width: 44px;
height: 57px;
}
<div class="pagination">
<div class="pagination_sub">
<div class="pagination_pre"></div>
<div class="prepagination">
<img src="../images/pgpage.jpg" width="44" height="57" />
</div>
<div class="greypagination">
<img src="../images/pg1-grey.jpg" width="33" height="57" />
</div>
<div class="greypagination">
<img src="../images/pg2-blank.jpg" width="33" height="57" />
</div>
<div class="prearrow"></div>
<div class="arrow">
<img src="../images/pgarrow.jpg" width="21" height="57" border="0" />
</div>
</div>
</div>
Related
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-type" content="text.html" charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Website</title>
<style>
body {
margin: 0;
}
#container {
width: 100%;
}
#headerBg {
width: 100%;
background-color: #ffffff;
}
#interior {
width: 100%;
margin: 0 auto;
}
#header {
width: 100%;
height: 85px;
}
#logo {
width: 200px;
height: 45px;
float: left;
display: inline-block;
margin-left: 40px;
margin-top: 40px;
}
#topNav {
width: 600px;
float: right !important;
color: #000000;
margin-right: 40px;
}
.topNavFont {
font-size:18px;
float: right;
font-family:sans-serif;
}
.social_youtube {
margin-right: 10px;
}
.social_facebook {
margin-right: 10px;
}
.social_twitter {
margin-right: 10px;
}
.searchbar {
width: 150px;
height: 30px;
margin-right: 40px;
font-size: 16px;
}
.button {
width: 130px;
height: 36px;
margin-right: 40px;
}
#bottomNav {
width: 870px;
float: right !important;
color: #000000;
margin-right: 40px;
margin-top: 10px;
}
.bottomNavFont {
font-size:1em;
color:#222;
float: right;
font-family:sans-serif;
}
.bottombutton {
width: 130px;
height: 35px;
}
#row {
margin-top: 30px;
}
img.team {
width: 1355px;
height: 650px;
margin-left: 45px;
margin-top: 5px;
}
img.leftarrow {
float: left;
width: 50px;
height: 50px;
margin-left: 40px;
margin-top: 55px;
}
div.pic {
width: 1450px;
}
img.lake {
margin-left: 30px;
}
img.battersea {
margin-left: 25px;
}
p.location {
display: inline-block;
margin-top: 5px;
margin-left: 20px;
padding-right: 100px;
}
p.battersea {
margin-left: 150px;
}
img.rightarrow {
width: 50px;
height: 50px;
margin-left: 15px;
margin-bottom: 70px;
}
#rows {
margin-top: 30px;
width: 1450px;
}
p.subtext {
display: inline-block;
width: 340px;
padding-right: 30px;
padding-left: 30px;
text-align: center;
margin-left: 20px;
margin-top: 5px;
}
p.juniors {
margin-left: 110px;
}
img.youth {
margin-left: 120px;
width: 383px;
}
img.regatta {
margin-left: 30px;
width: 383px;
}
img.rowathon {
margin-left: 32px;
width: 383px;
}
#story {
float: right;
width: 340px;
height: 300px;
margin-right: 150px;
margin-top: 50px;
}
#storytext {
margin-left: 115px;
margin-top: 50px;
height: 330px;
width: 1000px;
}
p.subheading {
width: 590px;
font-size: 19px;
font-weight: 600;
}
p.copy {
width: 790px;
height: 230px;
}
#footer {
margin-top: 70px;
height: 140px;
background-color: #0645be;
color: white;
font-size: 20px;
}
#leftside {
float: left;
margin-left: 45px;
text-align: left;
}
#rightside {
float: right;
margin-right: 35px;
text-align: right;
}
</style>
</head>
<body>
<div id="container">
<div id="headerBg">
<div id="interior">
<div id="header">
<div id="logo">
<img src="https://www.britishrowing.org/wp-content/themes/britishrowing/assets/img/brand/br-logo-horizontal.png" height="45" alt="logo">
</div>
<div id="topNav">
<img class="topNavFont social social_instagram" src="https://instagram-brand.com/wp-content/uploads/2016/11/Instagram_AppIcon_Aug2017.png?w=300" alt="instagram logo" width="37" height="36">
<img class="topNavFont social social_youtube" src="http://pluspng.com/img-png/youtube-png-youtube-play-button-png-free-download-396.png" alt="youtube logo" width="40" height="35">
<img class="topNavFont social social_facebook" src="https://s18955.pcdn.co/wp-content/uploads/2017/11/Facebook-share-icon.png" alt="facebook logo" width="37" height="35">
<img class="topNavFont social social_twitter" src="http://stagewp.sharethis.com/wp-content/uploads/2019/03/twitterimg.png" alt="twitter logo" width="37" height="35">
<form class="topNavFont"><input class="searchbar" value="Search..."></form>
<button class="topNavFont button">SIGN IN</button>
</div>
<div id="bottomNav">
<button class="bottomNavFont bottombutton shop">SHOP</button>
<button class="bottomNavFont bottombutton events">EVENTS</button>
<button class="bottomNavFont bottombutton news">NEWS</button>
<button class="bottomNavFont bottombutton go">GO ROWING</button>
<button class="bottomNavFont bottombutton about">ABOUT US</button>
<button class="bottomNavFont bottombutton home">HOME</button>
</div>
</div> <!-- closing header tag here -->
<!---------------------------->
<!-- end header code here ---->
<!---------------------------->
<div id="content">
<img class="team" src="https://www.britishrowing.org/wp-content/uploads/2017/02/Paralympics_11_09_16_1235-e1486995505416.jpg" width="1340" height="570">
</div>
<div id="row">
<img class="leftarrow" src="https://image.flaticon.com/icons/png/512/21/21256.png" width="50" height="50">
<div class="pic">
<img class="lake battersea" src="https://media.timeout.com/images/102759833/630/472/image.jpg" width="175" height="170" alt="Battersea Park">
<img class="lake" src="https://leytonstonelondone11.files.wordpress.com/2011/10/hollow-pond-boats.jpg" width="175" height="170" alt="Hollow Pond">
<img class="lake" src="https://media-cdn.tripadvisor.com/media/photo-s/04/0d/dc/b6/boating-pond.jpg" width="175" height="170" alt="Dulwich Park">
<img class="lake" src="http://www.utrc.org.uk/wp-content/uploads/2014/01/MensEight2012-for-ROWING-SQUADS-ABOUT.jpg" width="175" height="170" alt="Upper Thames">
<img class="lake" src="https://upload.wikimedia.org/wikipedia/commons/9/99/Regent%27s_Park_boating_lake_-_geograph.org.uk_-_21750.jpg" width="175" height="170" alt="Regents Park">
<img class="lake" src="https://i.pinimg.com/originals/57/63/cc/5763cc9831846834b8af799f748841c3.jpg" width="175" height="170" alt="Hyde Park">
<img class="rightarrow" src="https://image.flaticon.com/icons/png/512/20/20659.png" width="50" height="50">
<br>
<p class="location battersea">Battersea Park</p>
<p class="location hollow">Hollow Pond</p>
<p class="location dulwich">Dulwich Park</p>
<p class="location upper">Upper Thames</p>
<p class="location regents">Regents Park</p>
<p class="location hyde">Hyde Park</p>
</div>
</div>
<div id="rows">
<img class="youth" src="https://www.britishrowing.org/wp-content/uploads/2019/12/9-FRBC.png" alt="Youth Rowing Project" width="383">
<img class="regatta" src="https://www.britishrowing.org/wp-content/uploads/2019/07/England-Junior-Women-HIR2019.jpg" alt="International Womens Regatta" width="383">
<img class="rowathon" src="https://www.britishrowing.org/wp-content/uploads/2019/11/Ian-Jamieson-1600x900.jpg" alt="Charity Rowathon" width="383">
<br>
<p class="subtext juniors">Community-Focused Clubs Enables More Juniors to Reap the Benefits of Rowing</p>
<p class="subtext">Transformed Regatta Allows Cutting Edge International Rowing Competition</p>
<p class="subtext">Community-Focused Clubs Enables More Juniors to Reap the Benefits of Rowing</p>
</div>
<div id="story">
<img src="https://www.britishrowing.org/wp-content/uploads/2019/12/Shelagh-Allen.jpg" alt="Mary" width="375" height="300">
</div>
<div id="storytext">
<p class="subheading">Success for the older generation groups at the Mizuno British Indoor Rowing Championships</p>
<p class="copy">
Another keep fit enthusiast, who set herself the challenge of racing over 2000m, was Shelagh Allen. The 81-year-old, from West Byfleet in Surrey, was the oldest woman taking part in the Championships and the only competitor in the women’s 80-84 age group.
The former nurse, who finished in 10.42, took up indoor rowing at 58 and has since competed in many events, including the World Indoor Rowing Championships, and has held several British records.
She said: “I used to cycle but then tried indoor rowing and loved it.
I used to go five days a week but now go about three.
As long as I keep going I will keep doing it.
So many people say they are proud of me, which is great.”<br><br>
Her next major event will be the World Rowing Indoor Championships in Paris in February.<br>
In the meantime, the mother-of-two and grandmother-of-one will continue to go to the gym and power walk for an hour every morning with her husband Tom, 85.
The sprightly seniors impressed GB’s top para-rowers, who were also competing at the indoor championships, as part of the selection process for the Paralympics in Tokyo next year.
</p>
</div>
<div id="footer">
<div id="leftside">
<p>British Rowing, 6 Lower Mall, Hammersmith, London, W6 9DJ</p>
<p>Telephone: 020 8237 6700</p>
<p>Fax: 020 8237 6749</p>
</div>
<div id="rightside">
<p>Accessibility Statement</p>
<p>Privacy Policy and Cookies Policy</p>
<p>© Copyright 2019 British Rowing</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
As you would see, the header section, the story section and the footer section breaks. The main content in the middle seems to have elongated, so I'm not exactly sure on how to fix this. I have tried to decrease the width of the images, to see if that would fix the problem, however, when I exit from 'inspect code' it makes the images 'lessen' in width and does not fit with the rest of the content on the page.
This is the fourth attempt, after having other parts of the site break.
i think you should use css grid or flex box if you do not you can decrease size of sections like #row and images and use Percentage (%) for the values of the properties
(source: kheper.net)
The effect I'm going for is the whole square being one div, with each square being a smaller div within the bigger div, correctly aligned, to take up the entire viewport.
Similar to montere.it minus the JavaScript.
I've tried to highlight the problematic bits of code, the corresponding CSS isn't formatting correctly but I've linked a JS bin below.
Apologies if my code is spaghetti code, it's less my code and more a copy and paste session gone wild.
#bodyHobbies {
width: 100%;
height: 500px;
}
.intbox1 {
height: 25%;
width: 100%;
background-color: #009900;
margin: auto;
text-align: center;
}
.intbox2 {
height: 25%;
width: 100%;
background-color: #990000;
margin: auto;
text-align: center;
color: #FFFFFF;
}
.intbox3 {
height: 25%;
width: 100%;
background-color: #000000;
margin: auto;
text-align: center;
color: #FFFFFF;
}
.intbox4 {
height: 25%;
width: 100%;
background-color: #990000;
margin: auto;
text-align: center;
color: #FFFFFF;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div id="bodyHobbies">
<div class="intbox1">
<p>1</p>
<img src="foobar1.jpg" border="0" />
</div>
<div class="intbox2">
<p>2</p>
<img src="foobar.jpg" border="0" />
</div>
<div class="intbox3">
<p>3</p>
<img src="foobar.jpg" border="0" />
</div>
<div class="intbox4">
<p>4</p>
<img src="foobar.jpg" border="0" />
</div>
</div>
https://jsbin.com/heyibe/edit?html,css,output
you can done that using css3 flexbox concept
html,body{
margin:0;
padding:0;
width:100%;
height:100%;
}
img{
width:100%;
}
#bodyHobbies{
display:flex;
flex-flow: row wrap;
}
.item{
flex-basis:50%;
}
<div id="bodyHobbies">
<div class="intbox1 item"><p>1</p>
<img src="https://i.stack.imgur.com/GSqmw.jpg" border="0" />
</div>
<div class="intbox2 item"><p>2</p>
<img src="https://i.stack.imgur.com/GSqmw.jpg" border="0" />
</div>
<div class="intbox3 item"><p>3</p>
<img src="https://i.stack.imgur.com/GSqmw.jpg" border="0" />
</div>
<div class="intbox4 item"><p>4</p>
<img src="https://i.stack.imgur.com/GSqmw.jpg" border="0" />
</div>
</div>
Just added display: inline-table to you #bodyHobbies and added a common class to the intbox divs. Removed the individual intbox stylings related to width and heights.
#bodyHobbies {
width: 100%;
height: 500px;
display: inline-table;
}
.intbox {
width: 50%;
height: 50%;
display: inline-block;
}
.intbox img {
width: 100%;
}
.intbox1 {
background-color:#009900;
margin:auto;
text-align:center;
}
.intbox2 {
background-color:#990000;
margin:auto;
text-align:center;
color:#FFFFFF;
}
.intbox3 {
background-color:#000000;
margin:auto;
text-align:center;
color:#FFFFFF;
}
.intbox4 {
background-color:#933230;
margin:auto;
text-align:center;
color:#FFFFFF;
}
<div id="bodyHobbies">
<div class="intbox intbox1"><p>1</p>
<img src="http://lorempixel.com/900/700/sports/1/" border="0" />
</div>
<div class="intbox intbox2"><p>2</p>
<img src="http://lorempixel.com/900/700/sports/1/" border="0" />
</div>
<div class="intbox intbox3"><p>3</p>
<img src="http://lorempixel.com/900/700/sports/1/" border="0" />
</div>
<div class="intbox intbox4"><p>4</p>
<img src="http://lorempixel.com/900/700/sports/1/" border="0" />
</div>
</div>
Try this
<div id="bodyHobbies">
<div class="intbox1"><p>1</p>
<img src="foobar1.jpg" border="0" />
</div>
<div class="intbox2"><p>2</p>
<img src="foobar.jpg" border="0" />
</div>
<div class="intbox3"><p>3</p>
<img src="foobar.jpg" border="0" />
</div>
<div class="intbox4"><p>4</p>
<img src="foobar.jpg" border="0" />
</div>
CSS
#bodyHobbies div{
float: left;
width: 50%;
}
<div id="bodyHobbies">
<div class="box">
<p>1</p>
<img src="foobar1.jpg" border="0" />
</div>
<div class="box">
<p>2</p>
<img src="foobar.jpg" border="0" />
</div>
<div class="box">
<p>3</p>
<img src="foobar.jpg" border="0" />
</div>
<div class="box">
<p>4</p>
<img src="foobar.jpg" border="0" />
</div>
</div>
<style>
.box{width:calc(50% - 2px); margin:2px; float:left; min-height:100px;}
</style>
At css use vw, vh units to set body, parent element width, height to 100vw, 100vh. Set [class=^"int"] selector position to absolute. Set element left and top properties corresponding to the four positions within the viewport using :nth-of-type() pseudo class. left:0vw, top:0vh; left:50vw, top:0vh; left:0vw, top:50vh, left:50vw, top:50vh.
body {
width: 100vw;
height: 100vh;
}
#bodyHobbies {
width: 100vw;
height: 100vh;
display: block;
position: relative;
border: 2px solid sienna;
}
[class^="int"] {
width: 50vw;
height: 50vh;
display: block;
position: absolute;
border: 2px solid gold;
}
[class^="int"]:nth-of-type(1) {
left: 0vw;
top: 0vw;
background: blue;
}
[class^="int"]:nth-of-type(2) {
left: 50vw;
top: 0vh;
background: green
}
[class^="int"]:nth-of-type(3) {
left: 0vw;
top: 50vh;
background: red;
}
[class^="int"]:nth-of-type(4) {
left: 50vw;
top: 50vh;
background: tan;
}
<div id="bodyHobbies">
<div class="intbox1">
<p>1</p>
<img src="foobar1.jpg" border="0" alt="foobar1" />
</div>
<div class="intbox2">
<p>2</p>
<img src="foobar.jpg" border="0" alt="foobar2" />
</div>
<div class="intbox3">
<p>3</p>
<img src="foobar.jpg" border="0" alt="foobar3" />
</div>
<div class="intbox4">
<p>4</p>
<img src="foobar.jpg" border="0" alt="foobar4" />
</div>
</div>
jsfiddle https://jsfiddle.net/69zkbjgw/
Here is my code: http://pastebin.com/pDkM4FQi
#img1,
#img2,
#img3,
#img4 {
display: inline-block;
height: 100%;
}
#navBar {
background-color: white;
border: 1px solid white;
border-radius: 15px;
display: inline-block;
height: 100px;
margin: auto;
margin-top: 50px;
width: 1200px;
}
#navSplitter {
background-color: gray;
display: inline-block;
height: 80px;
margin-left: 20px;
margin-right: 20px;
width: 3px;
}
<div id="navBar">
<div id="navSplitter" style="background-color: black;" />
<img id="img1" src="img1.png" />
<div id="navSplitter" />
<img id="img2" src="img2.png" />
<div id="navSplitter" />
<img id="img3" src="img3.png" />
<div id="navSplitter" />
<img id="img4" src="img4.png" />
</div>
I can't get the images to line up in the navBar div. I tried everything I know about code, and even looked up some stuff but never found what I need to get these images to go on there with the splitters in between each picture.
How about putting all of the images in just one <div> and then add a left-padding and right-padding to the images? This way you don't have to deal with the alignment of the images that much.
Please note that id tags are unique. You don't use them everywhere in the html file. Use class if you need
The issue is in your HTML. There is no concept of self closing div tags in HTML 4.x.
change this <div id="navSplitter"/> to <div id="navSplitter"></div>.
or my suggestion is to use <span></span> tag to add splite because span is by-default inline-block element.
Hope this would help your issue.
Try this:- remove margin-left: 20px from #naviSplitter
<head>
<style>
#img1, #img2, #img3, #img4 {
display: inline-block;
height: 100%;
}
#navBar {
background-color: white;
border: 1px solid white;
border-radius: 15px;
display: inline-block;
height: 100px;
margin: auto;
margin-top: 50px;
width: 1200px;
}
#navSplitter {
background-color: gray;
display: inline-block;
height: 80px;
/*margin-left: 20px;*/
margin-right: 20px;
width: 3px;
}
</style>
</head>
<body>
<div id="navBar">
<div id="navSplitter" style="background-color: black;"/>
<img id="img1" src="img1.png"/>
<div id="navSplitter"/>
<img id="img2" src="img2.png"/>
<div id="navSplitter"/>
<img id="img3" src="img3.png"/>
<div id="navSplitter"/>
<img id="img4" src="img4.png"/>
</div>
</body>
divs aren't a self closing tag, which you are doing, therefore invalid HTML and by consequence the images are not working as expected.
So, I advise you to forget using div for splitting the images and just use a HTML list and then using a pseudo element ::before instead.
And to align, you need vertical-align:top because inline-block is baseline by default
#navBar {
background-color: white;
border: 1px solid white;
border-radius: 15px;
display: inline-block;
height: 100px;
margin: auto;
margin-top: 50px;
width: 1200px;
}
ul {
font-size: 0
}
li {
display: inline-block;
vertical-align: top;
height: 100%;
margin: 0 5px
}
li::before {
background-color: gray;
display: inline-block;
vertical-align: top;
height: 100px;
left: -5px;
width: 3px;
content: "";
position: relative
}
<div id="navBar">
<ul>
<li>
<img id="img1" src="//dummyimage.com/100x100" />
</li>
<li>
<img id="img2" src="//dummyimage.com/100x100" />
</li>
<li>
<img id="img3" src="//dummyimage.com/100x100" />
</li>
<li>
<img id="img4" src="//dummyimage.com/100x100" />
</li>
</ul>
</div>
Maybe you would rather something like this.
<div id="nav-bar">
<img src="http://dummyimage.com/80&text=1" alt="">
<img src="http://dummyimage.com/80&text=2" alt="">
<img src="http://dummyimage.com/80&text=3" alt="">
<img src="http://dummyimage.com/80&text=4" alt="">
</div>
Don't worry about closing tags for img elements anymore. But do make sure you write something descriptive in the alt attribute about what the image content is for people with disabilities.
html {
font-size: 16px;
}
I'm using rems to do most measurements. rems are based off of a base font-size. So we tend to set it in the html element. I think 16px is a good standard these days. 1rem therefore is 16px.
Using measurements like this allows you to arrange things relatively. You could also interchange with ems if you wanted to. They are based off of the parent element font-size.
#nav-bar {
max-width: 1200px;
width: 100%;
margin: 2rem auto;
text-align: center;
background-color: white;
border-radius: 1rem;
display: inline-block;
padding: .5rem;
}
#nav-bar img {
display: inline-block;
}
#nav-bar img:not(:last-child) {
margin-right: 1rem;
padding-right: 1rem;
border-right: 3px solid gray;
}
Instead of using an HTML element for aesthetics, we can push that into the CSS completely.
I use a right border on those navigation images and make use of the not pseudo-class combined with last-child as :not(:last-child) which selects all the images except the last one. So you don't see the right border at the end.
Your HTML is not valid. div tags cannot be closed this way.
<div />.
div tags are properly used this way.
<div></div>
Due to the lack of closing tags, your images and splitters are nested. This happens because your browser does not know how to display your page since the opened/closed tags don't match up. It is then trying to fix your code by adding a bunch of closing tags at the bottom of the code, one closing tag for each opened one that was not closed.
By simply closing your div tags, your images will align properly. Your CSS is valid.
No one talks about FLEXBOX. Still care about old IE?
#navBar {
background-color: white;
border: 1px solid white;
border-radius: 15px;
width: 1200px;
display: flex;
justify-content: center;
align-items: center;
}
img { width: 100px; height: 100px; background: red; }
hr {
border: none;
background-color: gray;
height: 80px;
margin-left: 20px;
margin-right: 20px;
width: 3px;
}
<div id="navBar">
<img id="img1" src="img1.png" />
<hr>
<img id="img2" src="img2.png" />
<hr>
<img id="img3" src="img3.png" />
<hr>
<img id="img4" src="img4.png" />
</div>
I would recommend removing the navSplitter elements completely, as they add an extra set of items (unnecessarily) that will need to be styled to ensure the images line up. Instead, you can just add padding / borders to the images individually, which will separate them as desired. Consider the following:
.image {
display: inline-block;
height: 100%;
padding: 20px;
border-right: 3px solid gray;
}
.image:last-of-type {
border-right: none;
}
#navBar {
background-color: white;
border: 1px solid white;
border-radius: 15px;
display: inline-block;
height: 100px;
margin: auto;
margin-top: 50px;
width: 1200px;
}
<div id="navBar">
<img class="image" src="http://placehold.it/150x150" />
<img class="image" src="http://placehold.it/150x150" />
<img class="image" src="http://placehold.it/150x150" />
<img class="image" src="http://placehold.it/150x150" />
</div>
I know this a rather specific question and basic html question, but it's been happening on a few of my pages now, and I'm curious as to what exactly is going on.
I have a series of div boxes lined up vertically on a page, each one contains a picture that is a link to a different page on the website. The problem is when I add more than 3 of these div boxes, suddenly all the links on above the bottom three stop working.
http://webstage.emich.edu/dining-new/locations/easterneateries.php
I've tried the same code in jsfiddle, as seen below:
.locationsbx {
position:absolute;
width: 540px;
height:70px;
z-index:5;
margin-left: auto;
margin-right:auto;
background-color: #363636;
margin-top:110px;
}
.primetriangle {
border-top:25px solid green;
height: 0;
position:absolute;
width: 0;
z-index:3;
border-right: 25px solid transparent;
height: 0;
position:absolute;
width: 0;
z-index:5;
border-top-color: #CCC;
}
<div class="locationsbx" style="position: absolute; width: 100%; height: 100px; margin-top: 20px;">
<div class="primetriangle" style="z-index: 4;"></div> <img style="width: 85px; margin-left: 5px; margin-top: -18px;" src="/dining-new/images/eateries/estreet.png" alt="" />
<div class="text" style="margin-left: 100px; margin-top: -35px; width: 430px;">text</div>
<div style="position: absolute; margin-left: 270px; margin-top: 45px; width: 320px;">
<img style="height: 35px;" src="/dining-new/images/open.png" alt="" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/menu.png" alt="" onmouseover="this.src='/dining-new/images/menu_hover.png';" onmouseout="this.src='/dining-new/images/menu.png';" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/nutrition.png" alt="" onmouseover="this.src='/dining-new/images/nutrition_hover.png';" onmouseout="this.src='/dining-new/images/nutrition.png';" />
</div>
</div>
<div class="locationsbx" style="position: absolute; width: 100%; height: 100px; margin-top: 130px;">
<div class="primetriangle" style="z-index: 4;"></div> <img style="width: 85px; margin-left: 5px; margin-top: -18px;" src="/dining-new/images/eateries/sunsetstripslogo.png" alt="" />
<div class="text" style="margin-left: 100px; margin-top: -35px; width: 430px;">text</div>
<div style="position: absolute; margin-left: 270px; margin-top: 45px; width: 320px;">
<img style="height: 35px;" src="/dining-new/images/open.png" alt="" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/menu.png" alt="" onmouseover="this.src='/dining-new/images/menu_hover.png';" onmouseout="this.src='/dining-new/images/menu.png';" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/nutrition.png" alt="" onmouseover="this.src='/dining-new/images/nutrition_hover.png';" onmouseout="this.src='/dining-new/images/nutrition.png';" />
</div>
</div>
<div class="locationsbx" style="position: absolute; width: 100%; height: 100px; margin-top:240px;">
<div class="primetriangle" style="z-index: 4;"></div> <img style="width: 85px; margin-left: 5px; margin-top: -18px;" src="/dining-new/images/eateries/sunsetstripslogo.png" alt="" />
<div class="text" style="margin-left: 100px; margin-top: -35px; width: 430px;">text</div>
<div style="position: absolute; margin-left: 270px; margin-top: 45px; width: 320px;">
<img style="height: 35px;" src="/dining-new/images/open.png" alt="" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/menu.png" alt="" onmouseover="this.src='/dining-new/images/menu_hover.png';" onmouseout="this.src='/dining-new/images/menu.png';" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/nutrition.png" alt="" onmouseover="this.src='/dining-new/images/nutrition_hover.png';" onmouseout="this.src='/dining-new/images/nutrition.png';" />
</div>
</div>
<div class="locationsbx" style="position: absolute; width: 100%; height: 100px; margin-top: 350px;">
<div class="primetriangle" style="z-index: 4;"></div> <img style="width: 85px; margin-left: 5px; margin-top: -18px;" src="/dining-new/images/eateries/sunsetstripslogo.png" alt="" />
<div class="text" style="margin-left: 100px; margin-top: -35px; width: 430px;">text</div>
<div style="position: absolute; margin-left: 270px; margin-top: 45px; width: 320px;">
<img style="height: 35px;" src="/dining-new/images/open.png" alt="" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/menu.png" alt="" onmouseover="this.src='/dining-new/images/menu_hover.png';" onmouseout="this.src='/dining-new/images/menu.png';" />
<img style="margin-left: 2px; height: 35px; display: inline;" src="/dining-new/images/nutrition.png" alt="" onmouseover="this.src='/dining-new/images/nutrition_hover.png';" onmouseout="this.src='/dining-new/images/nutrition.png';" />
</div>
</div>
and it's working fine there- so I'm confused as to what might be some of the reasons why putting the code on the actual server would be causing problems with disabling the links.
Any thoughts/explanations would be super super appreciated
**NOTE: I am well aware that it is not in good form to have inline styles, especially when I have the external CSS sheet anyways. However, the inline styles are just there until I can resolve the actual problem with the links.
** ALSO: The link to the page is very obviously under construction still. I have been dealing with the disabled links over multiple pages now and am much more concerned with why they're disabling than the rest of the page
I went to check the source of your page you linked to and you're not closing the <div> with the class="locationsbx" on your page. I think you're doing in the code you pasted above but not on the actual page.
EDIT: Not really a complete answer. I would have just left a comment but I need 50 points for that, I don't have those.
What I'm trying to create
Using HTML5 and CSS3 only, a horizontal row of three circles, each sitting on top of a different image, containing another image and one word of text.
What I have tried
I have tried to create this by just adding divs within divs and specifying heights and widths, but this has not worked. I sense I'm over-complicating something quite simple, or forgetting something very obvious. What is the simplest way of doing this?
A note
Go easy on me! I've been trying to self-learn for only 2 months.
The HTML
<div class="circlewrapper">
<div class="sector" id="read">
<img src="images/test1.jpg" class="image1" height="165" width="165" />
<div class="round" id="reading">
<img src="images/book.jpg" class="image2" height="20" width="20" />
<p id="readread">Read</p>
</div>
</div>
<div class="sector" id="listen">
<img src="images/test2.jpg" class="image1" height="165" width="165" />
<div class="round" id="listening">
<img src="images/book.jpg" class="image2" height="20" width="20" />
<p id="listlist">Listen</p>
</div>
</div>
<div class="sector" id="watch">
<img src="images/test3.jpg" class="image1" height="165" width="165" />
<div class="round" id="watching">
<img src="images/book.jpg" class="image2" height="20" width="20" />
<p id="watchwatch">Watch</p>
</div>
</div>
</div>
The CSS
.circlewrapper {
width: 800px;
height: 270px;
padding: 0px;
margin: 0px auto 0px auto;}
.sector {
width: 250px;
height: 250px;
padding: 0px;
margin: 8px;
display: inline;}
.round {
height: 165px;
width: 165px;
padding: 0px;
margin: 0px auto 0px auto;
background-color: blue;
border-radius: 165px;
-moz-border-radius: 165px;
-webkit-border-radius: 165px;
z-index: 10;}
p {
text-align: center;
color: white;}
.image1 {
margin: 0px auto 0px auto;
padding: 0px;
z-index: 5;}
.image2 {
margin: 0px auto 0px auto;
padding: 0px;}
Add to .sector float: left;. It worked for me.