So I am busy with responsive design, but I am not sure why there is a large gap on the side. I checked the console and the HTML tag shows everything is within the margin and I do not think anything is slipping on the edge to cause such a big gap on the side.
Can someone shed some light? If I missed something that is causing that.
let projects = document.querySelector(".projects");
let projectList = document.querySelector(".project-list")
let clickOffImage = document.querySelector(".img-fluid")
let clickOffnav = document.querySelector(".navbar")
projects.addEventListener('click', function handleClickOn() {
if (projects) {
projectList.style.display = "block";
}
})
clickOffImage.addEventListener('click', function handleClickOff() {
if (clickOffImage) {
projectList.style.display = "none"
}
})
//variables for card and close
let card = document.querySelector(".card")
let closeCard = document.querySelector(".close")
//event listener to close card
closeCard.addEventListener('click', function close() {
if (closeCard) {
card.style.display = "none";
}
})
//variables for furnspace card and close
let furnspace = document.querySelector(".furnspace");
let furnCard = document.querySelector(".furnspace-card");
let education = document.querySelector(".eHL");
//event listener to show furnspace card
furnspace.addEventListener('click', function openFCard() {
if (furnspace) {
furnCard.style.display = "block";
education.style.paddingTop = "-50rem";
}
})
//variables for card and close
let changingWCard = document.querySelector(".changing-card")
let changingclose = document.querySelector(".changing-card-close")
//event listener to close card
changingclose.addEventListener('click', function cWClose() {
if (changingclose) {
changingWCard.style.display = "none";
}
})
let cafmCard = document.querySelector(".cafm-card")
let cafmCardClose = document.querySelector(".cafm-card-close")
cafmCardClose.addEventListener('click', function cafmClose() {
if (changingclose) {
cafmCard.style.display = "none";
}
})
let changing = document.querySelector(".changing-workplace");
let changingCard = document.querySelector(".changing-card");
let cafm = document.querySelector(".cafm-card")
changing.addEventListener('click', function openCCard() {
if (changing) {
changingCard.style.display = "block";
cafm.style.display = "block";
}
})
let staffedCard = document.querySelector(".get-staffed-up-card")
let staffedClose = document.querySelector(".get-staffed-up-close")
staffedClose.addEventListener('click', function staffClose() {
if (staffedClose) {
staffedCard.style.display = "none";
}
})
let staffedUp = document.querySelector(".get-staffed-up");
let staffCard = document.querySelector(".get-staffed-up-card");
staffedUp.addEventListener('click', function openCCard() {
if (staffedUp) {
staffCard.style.display = "block";
}
})
#import url("https://fonts.googleapis.com/css2?family=Oleo+Script+Swash+Caps&display=swap");
#import url("https://fonts.googleapis.com/css2?family=Syne&display=swap");
#import url("https://fonts.googleapis.com/css2?family=Cinzel&display=swap");
body {
box-sizing: border-box;
font-family: "Syne", sans-serif;
font-size: 20px;
}
:root {
--darker-color: #22223b;
--grey-color: #4a4e69;
--light-color: #9a8c98;
--lighter-color: #c9ada7;
--lightest-color: #c9ada7;
--white-color: #ffffff;
}
.down-arrow {
width: 1vw;
}
.nav {
background-color: var(--grey-color) !important;
}
.navbar-brand,
.nav-link {
color: var(--white-color) !important;
}
.nav-link {
padding-left: 10rem !important;
}
.down-arrow {
filter: invert(99%) sepia(89%) saturate(0%) hue-rotate(233deg) brightness(108%) contrast(97%);
}
.project-list {
position: absolute;
background-color: var(--darker-color);
margin-left: 80rem;
padding-left: 2rem;
cursor: pointer;
padding-right: 1rem;
display: flex;
display: none;
}
.project-list ul {
list-style-type: none;
text-align: justify;
margin-left: -1rem;
margin-top: 1rem;
}
.project-item {
text-decoration: none;
color: var(--white-color);
margin-left: -2.3rem;
}
.project-item:hover {
background-color: var(--grey-color);
padding-left: 20px;
}
.hero-image {
padding: 0;
}
.hero-image img {
width: 100vw;
object-fit: cover;
height: auto;
}
.Heading {
position: absolute;
margin: 18rem;
font-weight: bold;
color: var(--darker-color);
}
.h1,
.h2,
.h3 {
font-size: 70px;
font-family: Cinzel, sans-serif;
}
.about-me-container {
margin-left: 25rem;
}
.head-shot img {
width: 10vw;
margin-top: 15rem;
margin-left: -10rem;
}
.aboutMe {
position: absolute;
margin-left: 30rem;
margin-top: 5rem;
font-family: Oleo Script Swash Caps;
color: var(--darker-color);
border-bottom: 5px solid var(--darker-color);
}
.aboutMe-par {
margin-left: 10rem;
margin-top: -15rem;
width: 50rem;
text-align: justify;
}
.experience {
margin-left: -10rem;
}
.eHL {
position: absolute;
margin-left: 65rem;
margin-top: 5rem;
font-family: Oleo Script Swash Caps;
color: var(--darker-color);
border-bottom: 5px solid var(--darker-color);
}
.work-container {
position: absolute;
display: flex;
flex-direction: row;
margin-left: 50rem;
margin-top: 15rem;
}
.changing-workplace,
.get-staffed-up {
margin-left: 5rem;
}
.changing-workplace,
.get-staffed-up,
.furnspace {
background-color: var(--darker-color);
color: var(--white-color);
width: 10rem;
height: 10rem;
border-radius: 100%;
cursor: pointer;
text-align: center;
}
.changing-workplace p,
.get-staffed-up p,
.furnspace p {
margin-top: 4rem;
}
.card-text {
width: 30rem;
height: 12rem;
margin-top: 3rem;
}
.card {
width: 32rem;
background-color: var(--grey-color);
color: var(--white-color);
margin-left: 53rem;
margin-top: 10rem;
}
.close {
position: absolute;
margin-left: 29rem;
cursor: pointer;
}
.text-muted {
color: var(--white-color) !important;
}
.furnspace-card,
.get-staffed-up-card {
position: absolute;
display: none;
}
.changing-card {
display: flex;
flex-direction: row;
position: absolute;
width: 35rem;
height: 22rem;
margin-top: 9rem;
margin-left: 32rem;
display: none;
}
.get-staffed-up-card {
height: 30rem;
}
.changing-card-close {
position: absolute;
margin-left: 32rem;
cursor: pointer;
}
.get-staffed-up-close {
position: absolute;
margin-left: 29rem;
cursor: pointer;
}
.cafm-card {
margin-left: 68rem;
}
.text-muted {
text-decoration: underline;
font-size: 18px;
}
.download-resume {
position: absolute;
margin: 30rem 65rem;
width: 13rem;
}
a {
text-decoration: none;
color: var(--white-color);
}
.download-resume :active {
background-color: var(--lightest-color);
}
button {
border: none;
background-color: var(--darker-color);
padding: 0.7rem;
border-radius: 2rem;
}
.education {
display: flex;
flex-direction: row;
}
.edu-card {
margin-left: 5rem;
padding-top: -2rem;
}
.education-container {
margin-top: 37rem;
margin-left: 55rem;
}
.education {
position: absolute;
margin-top: 5rem;
font-family: Oleo Script Swash Caps;
color: var(--darker-color);
border-bottom: 5px solid var(--darker-color);
}
.education-contain {
position: absolute;
margin-top: 5rem;
margin-left: -100rem;
display: grid;
grid-template-columns: 35rem 35rem 20rem;
}
.codespace-body {
width: 70rem;
height: 23rem;
}
.ux-text {
overflow: scroll;
}
#media (min-width: 576px) {
.Heading {
margin: 4em
}
.h1,
.h2,
.h3 {
font-size: 1em;
}
.aboutMe {
position: relative;
text-align: center;
margin-left: -8em;
margin-top: 1em;
border-bottom: 2px solid var(--darker-color);
width: 5em;
}
.aboutMe h1 {
font-size: 1em;
}
.head-shot img {
margin-left: -12em;
margin-top: 0.5em;
display: none;
}
.aboutMe-par {
margin-left: -16em;
margin-top: 1em;
text-align: justify;
}
.aboutMe-par p {
font-size: 0.7em;
width: 30em
}
.project-list {
margin-left: 20em;
margin-top: -4em;
}
.eHL {
margin-left: 48em;
margin-top: 1em;
}
.eHL h1 {
font-size: 1em;
}
.experience {
margin-left: -37em;
}
.furnspace,
.changing-workplace,
.get-staffed-up {
width: 5em;
height: 5em;
margin-top: -7em;
margin-left: 1em;
}
.furnspace p,
.changing-workplace p,
.get-staffed-up p {
font-size: 0.7em;
margin-top: 3em;
}
.download-resume {
margin: 13em 45em;
}
button {
padding: 0.2em;
}
.close,
.changing-card-close,
.get-staffed-up-close {
margin-left: 18em;
margin-top: 0em;
}
.furnspace-card,
.changing-card,
.get-staffed-up-card {
margin-top: 0em;
margin-left: 3em;
width: 20em;
height: 17em;
}
.cafm-card {
margin-top: 18em;
}
.card-title {
margin-top: 0.3em;
font-size: 0.8em;
}
.text-muted {
font-size: 0.7em;
}
.card-text {
overflow: scroll;
font-size: 0.8em;
width: 23em;
}
.education {
border-bottom: 5px solid var(--darker-color);
z-index: -1;
}
.education h1 {
font-size: 1em;
margin-top: -14.7em;
margin-left: -33em;
}
.education-contain {
margin-left: -84em;
margin-top: -15.7em;
display: block;
}
.codespace-card,
.ux-card,
.shaw-card {
width: 20em;
height: 17em;
}
.ux-card,
.shaw-card {
margin-top: 1em;
}
.codespace-link {
font-size: 0.8em;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/query.css">
<script src="js/main.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<title>Sheldon's Digital Resume</title>
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light nav">
<div class="container-fluid">
<div class="navbar-brand">Sheldon Aldridge</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class = "navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#aboutme">About Me</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Experience</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Education</a>
</li>
<li class="nav-item projects">
<a class="nav-link" href="#">Projects
<img class = "down-arrow" src="images/icons/down_arrow_icon.png" alt="Down_arrow_icon">
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contacts</a>
</li>
</ul>
</div>
</nav>
<div class="project-list">
<ul class="flex-column">
<li class="project-item ">Calculator App</li>
<li class="project-item">Vending Machine App</li>
<li class="project-item">Landing Page</li>
</ul>
</div>
<div class="container-fluid hero-image">
<div class="Heading">
<h1 class="h1">Hi! I'm Sheldon Aldridge</h1>
<h1 class="h2">Aspiring Front-End</h1>
<h1 class="h3">Developer</h1>
</div>
<picture>
<img class="img-fluid hero" src="../images/Hero-image.jpg" alt="Hero-image">
</picture>
</div>
</header>
<main>
<div class="about-me-container" id="aboutme">
<div class="head-shot">
<aside class="aboutMe">
<h1>About Me</h1>
</aside>
<img src="images/Profile Pic.png" alt="Head shot">
</div>
<div class="aboutMe-par">
<p>
I am self-motivated and dependable. I am always open to feedback and taking on new challenges to succeed. I am an aspiring front-end developer. I have developed key communication and problem-solving skills. I am not intimidated by ambiguity and can adapt
where needed.
</p>
<p>
I spent a few months from October 2021 - January 2022 working as a Junior Developer for a USA company Get Staffed Up. It was a great oppertunity for me to gain experience and the expectations for the industry. When my contract ended, I did a course in
Front-End Development and have recently received my certification of completetion.
</p>
<p>
My career goal is to work as a Front-End Developer where I can utilize my skillsets to create functional and aesthetically pleasing websites and user interfaces.
</p>
</div>
</div>
<div class="experience container" id="exp">
<div class="eHL">
<h1>Experience</h1>
</div>
<div class="work-container">
<div class="furnspace">
<p>3D Furnspace</p>
</div>
<div class="changing-workplace">
<p>The Changing Workplace</p>
</div>
<div class="get-staffed-up">
<p>Get Staffed Up</p>
</div>
</div>
<div class="download-resume">
<button>Download Resume</button>
</div>
</div>
<div class="card furnspace-card">
<div class="card-body">
<div class="close">
<p>X</p>
</div>
<h5 class="card-title">3D Furnspace (January 2014 - November 2017)
</h5>
<h6 class="card-subtitle mb-2 text-muted">Tech Support</h6>
<p class="card-text">In this role I gave technical support for the 3D software called InteriCAD T5. I not only gave technical support for the software, but I also gave training as well. I was also responsible for doing internet speed tests for the building, troubleshoot
network/internet problems for the tenants that were renting the building.</p>
</div>
</div>
<div class="card changing-card">
<div class="card-body">
<div class="changing-card-close">
<p>X</p>
</div>
<h5 class="card-title">The Changing Workplace (November 2017 - March 2020)</h5>
<h6 class="card-subtitle mb-2 text-muted">Help Desk</h6>
<p class="card-text">In this role I responded electronically to clients’ requests via email. I used a ticketing system that would be raised by helpdesk in relation to the clients query I had received via email. I diagnose their issue by doing research with the available
information and advising the client what the best course of action would be.</p>
</div>
</div>
<div class="card changing-card cafm-card">
<div class="card-body">
<div class="changing-card-close cafm-card-close">
<p>X</p>
</div>
<h5 class="card-title">The Changing Workplace (March 2020 - April 2021)</h5>
<h6 class="card-subtitle mb-2 text-muted">CAFM Co-ordinator</h6>
<p class="card-text">In this role I was accountable for managing the data and drawings using the database and AutoCAD software to complete tasks given from the client in a timely manner and taking an analytical approach to implementing the requested changes from the
client.
</p>
</div>
</div>
<div class="card get-staffed-up-card">
<div class="card-body">
<div class="get-staffed-up-close">
<p>X</p>
</div>
<h5 class="card-title">Get Staffed Up (October 2021 - January 2022)
</h5>
<h6 class="card-subtitle mb-2 text-muted">Junior Developer</h6>
<p class="card-text">I worked as a Junior Developer, the main language I used in the time that I worked there was JavaScript.I worked on a project where I worked with 2 different API's one was Big Query in Google and the other was Zoho which is a CRM system. I used
Javascript to connect the 2 databases, count the rows and compare the rows, if the rows do not match send an email notification. I was also responsible to research and write a procedure for Github for the team, along with anything else the department
needed research on.
</p>
</div>
</div>
<div class="container education-container" id="education">
<div class="education">
<h1>Education</h1>
</div>
<div class="container education-contain">
<!--Codespace-->
<div class="card codespace-card">
<div class="card-body codespace-body">
<h5 class="card-title codespace-title">Code Space Academy (2022)
</h5>
<h6 class="card-subtitle mb-2 text-muted">Front End Development</h6>
<p class="card-text codespace-text">During this course we were taught the following stack HTML5,CSS3,Javascript,Vue Framework, Bootstrap. We were required to build and submit real life projects, such as a To-Do App, Netflix app and an online store website. While building these
projects we had to utilize everything we have learnt including responsive design.
</p>
CodeSpace Website
Github projects
</div>
</div>
<!--Get Smarter-->
<div class="card ux-card">
<div class="card-body ux-body">
<h5 class="card-title ux-title">Get Smarter (2021)</h5>
<h6 class="card-subtitle mb-2 text-muted">User Experience Designer</h6>
<p class="card-text ux-text">The User Experience Design online short course enables me to understand how users interact with online content so that I am able to design environments that meet the users evolving needs. I had learned key UX research and design techniques,
and learned how to work with stakeholders, run user tests, design wireframes, and develop prototypes. I also learned how to analyse current trends in the field. Doing this course help broaden my knowledge and expand my web design knowledge.
</p>
GetSmarter Website
</div>
</div>
<!--Shaw Academy-->
<div class="card shaw-card">
<div class="card-body shaw-body">
<h5 class="card-title shaw-title">Shaw Academy (2020)</h5>
<h6 class="card-subtitle mb-2 text-muted">Web Design</h6>
<p class="card-text shaw-text">This course gave the basics of HTML and CSS. I had gained the knowledge of building basic and static website.
</p>
Shaw Academy Website
</div>
</div>
</div>
</main>
</body>
</html>
Sorry if the title doesn't explain it. I have footer and it includes whatever is above the footer. If I have text above the footer (as a sibling of the footer tag) the footer includes the text as part of the footer. Here is my code:
<section id="description">
<div id="description1">
<div class="container">
<h3><em>text</em></h3>
<p>text</p>
</div>
</div>
<div id="description2">
<div class="container">
<h3><em>text</em></h3>
<p>text</p>
</div>
</div>
</section>
<footer>
<div class="container">
<p id="copywrite">AllKind Corporation, Copyright © 2018</p>
Credits
<p id=disclaimer>By using this site, you agree to our Privacy Policy and Terms of Conditions.</p>
<p id="license">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" />
</a>
<br />This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
</p>
</div>
</footer>
For some reason my footer is including the description (a child of <section id="description">) in the footer. I have narrowed the issue down to having to do with the float: right; tag in the CSS for description2.
Here is my CSS for the description and footer.
/* Description */
#description1 {
text-align: center;
font-size: 18px;
float: left;
padding-left: 100px;
padding-top: 30px;
}
#description2 {
text-align: center;
font-size: 18px;
float: right;
padding-right: 100px;
padding-top: 30px;
}
/* Footer */
footer {}
#copywrite {
text-align: center;
font-size: 13px;
}
#credits {
font-size: 18px;
text-decoration: none;
text-transform: uppercase;
text-align: left;
}
#disclaimer {
font-size: 15px;
text-align: center;
margin-top: -28px;
margin-bottom: 0;
}
#license img {
float: right;
margin-top: -27px;
}
#license {
font-size: 10px;
text-align: center;
margin-top: 10px;
margin-bottom: -2px;
}
You need to clear the float first. The issue you are facing is due to the floating elements
#description1 {
text-align: center;
font-size: 18px;
float: left;
padding-left: 100px;
padding-top: 30px;
}
#description2 {
text-align: center;
font-size: 18px;
float: right;
padding-right: 100px;
padding-top: 30px;
}
/*This is to clear the float*/
.clearfix {
clear: both
}
/* Footer */
footer {}
#copywrite {
text-align: center;
font-size: 13px;
}
#credits {
font-size: 18px;
text-decoration: none;
text-transform: uppercase;
text-align: left;
}
#disclaimer {
font-size: 15px;
text-align: center;
margin-top: -28px;
margin-bottom: 0;
}
#license img {
float: right;
margin-top: -27px;
}
#license {
font-size: 10px;
text-align: center;
margin-top: 10px;
margin-bottom: -2px;
}
<section id="description">
<div id="description1">
<div class="container">
<h3><em>text</em></h3>
<p>text</p>
</div>
</div>
<div id="description2">
<div class="container">
<h3><em>text</em></h3>
<p>text</p>
</div>
</div>
</section>
<div class="clearfix"></div><!--Clearing the float -->
<footer>
<div class="container">
<p id="copywrite">AllKind Corporation, Copyright © 2018</p>
Credits
<p id=disclaimer>By using this site, you agree to our Privacy Policy and Terms of Conditions.</p>
<p id="license">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png"/>
</a>
<br />This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
</p>
</div>
</footer>
Note the clearfix element and the class in CSS
Here is the jsfiddle demo: http://jsfiddle.net/GCu2D/4533/
If you want a quick way to separate the section from the footer you can add the following to the CSS ...
#description {
display: table;
width: 100%;
}
Maybe explain a bit more what you want to achieve.
UPDATE: The best way is the clearing the float though as mentioned in another answer.. You can apply the clear: both directly to the footer without adding another DIV
I think you want like this:-
#description1 {
text-align: center;
font-size: 18px;
float: left;
padding-left: 100px;
padding-top: 30px;
width:50%;
}
#description2 {
text-align: center;
font-size: 18px;
float: right;
padding-right: 100px;
padding-top: 30px;
width:50%;
}
/* Footer */
footer {}
#copywrite {
text-align: center;
font-size: 13px;
}
#credits {
font-size: 18px;
text-decoration: none;
text-transform: uppercase;
text-align: left;
}
#disclaimer {
font-size: 15px;
text-align: center;
margin-top: -28px;
margin-bottom: 0;
}
#license img {
float: right;
margin-top: -27px;
}
#license {
font-size: 10px;
text-align: center;
margin-top: 10px;
margin-bottom: -2px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<section id="description">
<div id="description1">
<div class="">
<h3><em>text</em></h3>
<p>text</p>
</div>
</div>
<div id="description2">
<div class="">
<h3><em>text</em></h3>
<p>text</p>
</div>
</div>
</section>
<div class="clearfix"></div>
<footer>
<div class="container">
<p id="copywrite">AllKind Corporation, Copyright © 2018</p>
Credits
<p id=disclaimer>By using this site, you agree to our Privacy Policy and Terms of Conditions.</p>
<p id="license">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" />
</a>
<br />This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
</p>
</div>
</footer>
If you want like this then i will explain it.
I am working on a page in Drupal 7 in which I have a number of boxes with text and a photo inside of them. I have the entire box div linking to its content page, but I can't seem to get rid of the underline.
I have tried applying text-decoration: none; to every class inside of and outside of the box and the text inside the box is still underlined.
Even when I use developer tools/'inspect element' tool in Google it shows that the computed style for the box and the text within is text-decoration: none;
I have been trying to figure this out off and on for about a day now and I have not been able to find any solutions via Google.
Any ideas?
Thanks in advance.
Edit: I am working to post my code. I am trying to find a good solution for posting because it is a page within Drupal that is rendering through Views. Also, I have a job interview in an hour that I'm getting ready for. I probably should have waited until after the interview to post this issue.. oh well.
Edit x2: My HTML is as follows:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" version="XHTML+RDFa 1.0" dir="ltr" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" class="js"><head profile="http://www.w3.org/1999/xhtml/vocab">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Drupal 7 (http://drupal.org)">
<title>Portfolio Page | mywebsite.com</title>
<style type="text/css" media="all">#import url("http://url.com/modules/system/system.base.css?m178g6");
#import url("http://url.com/modules/system/system.menus.css?m178g6");
#import url("http://url.com/modules/system/system.messages.css?m178g6");
#import url("http://url.com/modules/system/system.theme.css?m178g6");</style>
<style type="text/css" media="all">#import url("http://url.com/misc/ui/jquery.ui.core.css?m178g6");
#import url("http://url.com/misc/ui/jquery.ui.theme.css?m178g6");
#import url("http://url.com/modules/overlay/overlay-parent.css?m178g6");</style>
<style type="text/css" media="all">#import url("http://url.com/modules/comment/comment.css?m178g6");
#import url("http://url.com/modules/field/theme/field.css?m178g6");
#import url("http://url.com/modules/node/node.css?m178g6");
#import url("http://url.com/modules/search/search.css?m178g6");
#import url("http://url.com/modules/user/user.css?m178g6");
#import url("http://url.com/sites/all/modules/views/css/views.css?m178g6");</style>
<style type="text/css" media="all">#import url("http://url.com/sites/all/modules/ctools/css/ctools.css?m178g6");
#import url("http://url.com/sites/all/modules/lightbox2/css/lightbox.css?m178g6");
#import url("http://url.com/sites/all/modules/views_slideshow/views_slideshow.css?m178g6");
#import url("http://url.com/modules/shortcut/shortcut.css?m178g6");
#import url("http://url.com/modules/toolbar/toolbar.css?m178g6");</style>
<style type="text/css" media="all">#import url("http://url.com/sites/all/themes/personal/css/style.css?m178g6");</style>
<style type="text/css" media="print">#import url("http://url.com/sites/all/themes/personal/css/print.css?m178g6");</style>
<style type="text/css" media="mobile">#import url("http://url.com/sites/all/themes/personal/css/mobile.css?m178g6");</style>
<script type="text/javascript" src="http://url.com/misc/jquery.js?v=1.4.4"></script>
<script type="text/javascript" src="http://url.com/misc/jquery.once.js?v=1.2"></script>
<script type="text/javascript" src="http://url.com/misc/drupal.js?m178g6"></script>
<script type="text/javascript" src="http://url.com/misc/ui/jquery.ui.core.min.js?v=1.8.7"></script>
<script type="text/javascript" src="http://url.com/sites/all/modules/views/js/views-contextual.js?m178g6"></script>
<script type="text/javascript" src="http://url.com/misc/jquery.ba-bbq.js?v=1.2.1"></script>
<script type="text/javascript" src="http://url.com/modules/overlay/overlay-parent.js?v=1.0"></script>
<script type="text/javascript" src="http://url.com/misc/jquery.cookie.js?v=1.0"></script>
<script type="text/javascript" src="http://url.com/sites/all/modules/lightbox2/js/lightbox.js?1332273397"></script>
<script type="text/javascript" src="http://url.com/sites/all/modules/views_slideshow/js/views_slideshow.js?m178g6"></script>
<script type="text/javascript" src="http://url.com/modules/toolbar/toolbar.js?m178g6"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"personal","theme_token":"0CkOwyp1neNP-2IbE8LYCgYGBJ9sz39ORy5DodizAGg","js":{"misc\/jquery.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"misc\/ui\/jquery.ui.core.min.js":1,"sites\/all\/modules\/views\/js\/views-contextual.js":1,"misc\/jquery.ba-bbq.js":1,"modules\/overlay\/overlay-parent.js":1,"misc\/jquery.cookie.js":1,"sites\/all\/modules\/lightbox2\/js\/lightbox.js":1,"sites\/all\/modules\/views_slideshow\/js\/views_slideshow.js":1,"modules\/toolbar\/toolbar.js":1},"css":{"modules\/system\/system.base.css":1,"modules\/system\/system.menus.css":1,"modules\/system\/system.messages.css":1,"modules\/system\/system.theme.css":1,"misc\/ui\/jquery.ui.core.css":1,"misc\/ui\/jquery.ui.theme.css":1,"modules\/overlay\/overlay-parent.css":1,"modules\/comment\/comment.css":1,"modules\/field\/theme\/field.css":1,"modules\/node\/node.css":1,"modules\/search\/search.css":1,"modules\/user\/user.css":1,"sites\/all\/modules\/views\/css\/views.css":1,"sites\/all\/modules\/ctools\/css\/ctools.css":1,"sites\/all\/modules\/lightbox2\/css\/lightbox.css":1,"sites\/all\/modules\/views_slideshow\/views_slideshow.css":1,"modules\/shortcut\/shortcut.css":1,"modules\/toolbar\/toolbar.css":1,"sites\/all\/themes\/personal\/css\/style.css":1,"sites\/all\/themes\/personal\/css\/print.css":1,"sites\/all\/themes\/personal\/css\/mobile.css":1}},"lightbox2":{"rtl":0,"file_path":"\/(\\w\\w\/)public:\/","default_image":"\/sites\/all\/modules\/lightbox2\/images\/brokenimage.jpg","border_size":10,"font_color":"000","box_color":"fff","top_position":"","overlay_opacity":"0.8","overlay_color":"000","disable_close_click":true,"resize_sequence":0,"resize_speed":400,"fade_in_speed":400,"slide_down_speed":600,"use_alt_layout":false,"disable_resize":false,"disable_zoom":false,"force_show_nav":false,"show_caption":true,"loop_items":false,"node_link_text":"View Image Details","node_link_target":false,"image_count":"Image !current of !total","video_count":"Video !current of !total","page_count":"Page !current of !total","lite_press_x_close":"press \u003Ca href=\u0022#\u0022 onclick=\u0022hideLightbox(); return FALSE;\u0022\u003E\u003Ckbd\u003Ex\u003C\/kbd\u003E\u003C\/a\u003E to close","download_link_text":"Download Original","enable_login":false,"enable_contact":false,"keys_close":"c x 27","keys_previous":"p 37","keys_next":"n 39","keys_zoom":"z","keys_play_pause":"32","display_image_size":"","image_node_sizes":"()","trigger_lightbox_classes":"","trigger_lightbox_group_classes":"","trigger_slideshow_classes":"","trigger_lightframe_classes":"","trigger_lightframe_group_classes":"","custom_class_handler":0,"custom_trigger_classes":"","disable_for_gallery_lists":true,"disable_for_acidfree_gallery_lists":true,"enable_acidfree_videos":true,"slideshow_interval":5000,"slideshow_automatic_start":true,"slideshow_automatic_exit":true,"show_play_pause":true,"pause_on_next_click":false,"pause_on_previous_click":true,"loop_slides":false,"iframe_width":600,"iframe_height":400,"iframe_border":1,"enable_video":false},"overlay":{"paths":{"admin":"node\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode\/*\/revisions\/*\/delete\nnode\/add\nnode\/add\/*\noverlay\/dismiss-message\nuser\/*\/shortcuts\nadmin\nadmin\/*\nbatch\ntaxonomy\/term\/*\/edit\nuser\/*\/cancel\nuser\/*\/edit\nuser\/*\/edit\/*","non_admin":"admin\/structure\/block\/demo\/*\nadmin\/reports\/status\/php"},"ajaxCallback":"overlay-ajax"},"tableHeaderOffset":"Drupal.toolbar.height"});
//--><!]]>
</script>
</head>
<body class="html not-front logged-in no-sidebars page-portfolio toolbar toolbar-drawer lightbox-processed" style="padding-top: 65px; ">
<div id="skip-link">
Skip to main content
</div>
<div id="overlay-disable-message" class="clearfix"><h3 class="element-invisible">Options for the administrative overlay</h3>If you have problems accessing administrative pages on this site, disable the overlay on your profile page. Dismiss this message.</div><div id="toolbar" class="toolbar overlay-displace-top clearfix toolbar-processed">
<div class="toolbar-menu clearfix">
<ul id="toolbar-home"><li class="home first last"><span class="home-link">Home</span></li>
</ul> <ul id="toolbar-user"><li class="account first">Hello <strong>user</strong></li>
<li class="logout last">Log out</li>
</ul> <h2 class="element-invisible">Administrative toolbar</h2><ul id="toolbar-menu"><li class="menu-11 path-admin-dashboard first"><span class="icon"></span>Dashboard <span class="element-invisible">(View and customize your dashboard.)</span></li>
<li class="menu-9 path-admin-content"><span class="icon"></span>Content <span class="element-invisible">(Administer content and comments.)</span></li>
<li class="menu-21 path-admin-structure"><span class="icon"></span>Structure <span class="element-invisible">(Administer blocks, content types, menus, etc.)</span></li>
<li class="menu-7 path-admin-appearance"><span class="icon"></span>Appearance <span class="element-invisible">(Select and configure your themes.)</span></li>
<li class="menu-18 path-admin-people"><span class="icon"></span>People <span class="element-invisible">(Manage user accounts, roles, and permissions.)</span></li>
<li class="menu-16 path-admin-modules"><span class="icon"></span>Modules <span class="element-invisible">(Extend site functionality.)</span></li>
<li class="menu-8 path-admin-config"><span class="icon"></span>Configuration <span class="element-invisible">(Administer settings.)</span></li>
<li class="menu-19 path-admin-reports"><span class="icon"></span>Reports <span class="element-invisible">(View reports, updates, and errors.)</span></li>
<li class="menu-12 path-admin-help last"><span class="icon"></span>Help <span class="element-invisible">(Reference for usage, configuration, and modules.)</span></li>
</ul> Hide shortcuts </div>
<div class="toolbar-drawer clearfix">
<div class="toolbar-shortcuts"><ul class="menu"><li class="first leaf">Add content</li>
<li class="leaf">Find content</li>
<li class="leaf">Performance</li>
<li class="last leaf">Maintenance mode</li>
</ul></div>Edit shortcuts </div>
</div>
<!-- If front page, present front page content -->
<div id="a">
<!-- Begin other page specific content -->
<div id="smallhead">
</div>
</div><!-- End div a-->
<!-- Begin menu -->
<div id="b">
<div id="menu">
<div class="item">Home</div>
<div class="item">About Me</div>
<div class="item">Portfolio</div>
<div class="item">Photos</div>
<div class="item">Projects</div>
<div class="item">Blog</div>
</div>
</div>
<div id="c">
<div id="middle">
<!-- Begin other page specific content -->
<div id="contentwrapper">
<div class="region region-content">
<div id="block-system-main" class="block block-system">
<div class="content">
<div class="view view-portfolio-page view-id-portfolio_page view-display-id-page view-dom-id-a0c892fe2818834f0a7750c98e7e6688">
<div class="view-content">
<div class="views-row views-row-1 views-row-odd views-row-first">
<div> <div><a href="/node/10">
<div class="smallbox">
<div class="nounderline">
<strong>Postcards</strong><br>
<img typeof="foaf:Image" src="" width="233" height="157" alt=""><br>
Postcards<br>
Adobe Illustrator
</div>
</div></a></div> </div> </div>
<div class="views-row views-row-2 views-row-even">
<div> <div><a href="/node/9">
<div class="smallbox">
<div class="nounderline">
<strong>Design</strong><br>
<img typeof="foaf:Image" src="" width="233" height="157" alt=""><br>
Desiugn<br>
Adobe Illustrator
</div>
</div></a></div> </div> </div>
<div class="views-row views-row-3 views-row-odd">
<div> <div><a href="/node/8">
<div class="smallbox">
<div class="nounderline">
<strong>Website</strong><br>
<img typeof="foaf:Image" src="" width="233" height="157" alt="screenshot"><br>
Awareness Campaign<br>
HTML, CSS
</div>
</div></a></div> </div> </div>
<div class="views-row views-row-4 views-row-even views-row-last">
<div> <div><a href="/node/7">
<div class="smallbox">
<div class="nounderline">
<strong>Website</strong><br>
<img typeof="foaf:Image" src="" width="233" height="157" alt=""><br>
Details Website<br>
HTML 5, CSS 3
</div>
</div></a></div> </div> </div>
</div>
</div> </div>
</div>
</div>
</div>
<!-- End other page specific content -->
</div><!--end middle-->
</div>
<div id="d">
<div id="footer">
;Contact Form
<br>
Copyright ©2012 My Name
</div>
</div>
<div id="lightbox2-overlay" style="display: none; "></div> <div id="lightbox" style="display: none;" class="lightbox2-orig-layout"> <div id="outerImageContainer" style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); "><div id="modalContainer" style="display: none; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "></div><div id="frameContainer" style="display: none; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "></div><div id="imageContainer" style="display: none; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "><img id="lightboxImage" alt=""><div id="hoverNav"><a id="prevLink" title="Previous" href="#" style="padding-top: 10px; "></a><a id="nextLink" title="Next" href="#" style="padding-top: 10px; "></a></div></div><div id="loading"></div></div> <div id="imageDataContainer" class="clearfix" style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); "> <div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav"><div id="frameHoverNav"><a id="framePrevLink" title="Previous" href="#" style="padding-top: 10px; "></a><a id="frameNextLink" title="Next" href="#" style="padding-top: 10px; "></a></div><a id="bottomNavClose" title="Close" href="#" style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); "></a><a id="bottomNavZoom" href="#"></a><a id="bottomNavZoomOut" href="#"></a><a id="lightshowPause" title="Pause Slideshow" href="#" style="display: none;"></a><a id="lightshowPlay" title="Play Slideshow" href="#" style="display: none;"></a></div></div> </div> </div></body></html>
And my CSS is as follows:
#charset "utf-8";
/* CSS Document */
body{
background: black;
font-size: 14px;
margin: 0;
}
a:visited{
color: blue;
}
h2{
font-size: 135%;
margin: .2em 0;
}
#a{
width: 100%;
background: rgb(140,79,84);
}
#bighead{
height: 31em;
width: 69em;
margin: 0 auto;
padding-top: 2em;
background: url(../img/headerpic.jpg);
text-align: center;
border: 0 solid black;
border-width: 0 4px;
}
#header a{
font-size: 35px;
text-decoration: none;
color: black;
}
#slogan{
font-size: 18px;
padding: .5em;
}
#smallhead{
height: 14em;
width: 69em;
margin: 0 auto;
background: url(../img/smallheader.jpg);
text-align: center;
border: 0 solid black;
border-width: 0 4px;
}
#b{
width: 100%;
background: rgb(50,51,46);
}
#menu{
width: 69em;
height: 2.5em;
border: 0 solid black;
border-width: 0 4px;
background: black;
text-align: center;
margin: 0 auto;
}
.item{
font-size: 17.5px;
height: 1.1em;
width: 9.2em;
float: left;
padding: .3em 0;
border-top: .2em solid rgb(31,38,28);
border-bottom: .2em solid rgb(31,38,28);
}
#menu a:link, a:visited{
text-decoration: none;
color: #CCC;
}
#menu a:hover{
color: white;
background: white;
text-decoration: underline;
}
#c{
width: 100%;
background: rgb(139,124,108);
}
#middle{
min-height: 22.5em;
width: 67.6em;
margin: 0 auto;
border: 0 solid black;
border-width: 0 4px;
background: rgb(98,103,109);
padding: .75em;
text-decoration: none;
}
.title{
font-size: 2em;
height: .5em;
width: 24em;
padding-left: 1em;
padding-bottom: .25em;
color: white;
}
.box{
float: left;
height: 17em;
width: 17em;
padding: 1em;
padding-top: .5em;
margin: 1.5em;
background: rgb(49,49,51);
color: white;
}
#contentwrapper{
}
#d{
width: 100%;
background: black;
}
#footer{
height: 2.5em;
width: 69em;
margin: 0 auto;
background: black;
text-align: center;
color: white;
}
.smallbox{
float: left;
height: 15em;
width: 17em;
padding: 1em;
padding-top: .5em;
margin: 1.5em;
background: rgb(49,49,51);
color: white;
text-align: center;
text-decoration: none;
}
.smallbox img{
padding: .2em 0;
}
.nounderline{
text-decoration: none;
}
Since this was the first google result and didn't solve my issue: Check the anchor states, as it might need to be set in one of the others. (https://www.w3schools.com/css/css_pseudo_classes.asp)
a,
a:link,
a:visited,
a:hover,
a:active{
text-decoration: none;
}
To apply just to this view add:
.view-portfolio-page .views-row a { text-decoration: none; }
To apply to all views add:
.views-row a { text-decoration: none; }
http://jsfiddle.net/D8kRE/
You were applying text-decoration: none to a div which has no effect. You can only apply that to an anchor tag which in your case is located at .views-row a. You can get more specific and apply this to only the portfolio page view by using the code I've put above.
If you are refering to the underline on the text, remember to set the text-decoration property to none on the ELEMENT. E.g.
<html>
<head></head>
<body>
<div>
Google
</div>
</body>
Edit: Note, it is bad to use styling in-line with elements, I used it, just to demonstrate a solution.
Instead of font-decoration: none; try the css text-decoration: none;
As this hasn't actually got a definitive answer yet and it's fairly high up on Google searches. I thought I would chip in with my answer.
I just had a similar problem where I couldn't pinpoint why I wasn't able to get rid of the underline and found out that it was because I didn't specify the hover state.
So try out
#header a:hover {
text-decoration: none;
}
And that should work. I know this was posted ages ago, but I have seen that you haven't accepted an answer and didn't post whether you sorted it or not. So hopefully my input will help someone along the way and hopefully you can see this and finally accept an answer or make your own.
I know this is old, but this came upon my search as well. So I thought I'd share.
I had a similar problem. I created a regular nav and setting the text-decoration to none worked fine.
Then I had to amend my css to create a hamburger menu effect for smaller viewports. And although I used the exact same css, the underline appeared and nothing I did would make it go away. I know it has something to do with the toggle:checked & ~.mainNav feature under which my nav needed to be placed, but I couldn't figure out why and how to get around it.
In any case, the one thing that DID work was going into my reset, and adding a default: a {text-decoration: none}
Don't know why it worked, but it did. Hope this helps someone.
I ran into this problem and found it was "box-shadow." See if you are lucky enough with these styles:
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
This doesn't appear to be a text-decoration: issue. It actually appears to be an issue with border-bottom:
Please check the instance of border-bottom in:
.item{
font-size: 17.5px;
height: 1.1em;
width: 9.2em;
float: left;
padding: .3em 0;
border-top: .2em solid rgb(31,38,28);
border-bottom: .2em solid rgb(31,38,28);
}
try to add !important
text-decoration: none !important;
text-decoration works on anchor, it's correct name would be: anchor-decoration-for-text.