PHP: How to style session output [closed]
Tags: php,css,session,styles
Problem :
I have this PHP code:
<?php
session_start();
if (!empty($_SESSION['username'])) {
?>
Welcome, <?= $_SESSION['username'] ?>
<br>
<a href='mcLogout.php'>Logout</a>
<?php
} else {
?>
<p class="da">Don't have an account?</p>
<p><a class="lr" href='registrationpage.php'>Register Here</a></p>
<?php
}
?>
The code is display the username of the user who is in the session (logged) and a link to log out. I wish to know how can I give a style to the username using CSS i.e:
"Welcome, <?=$_SESSION['username']?>"
This part of the code.
Solution :
what ever comes between wihle echoing are just like any other HTML element.
<h1>" Welcome, " <?= $_SESSION['username'] ?></h1>
or
Welcome, <h1 class="username"><?= $_SESSION['username'] ?></h1>
CSS Howto..
hovering over the image usually displays the value of the title attribute. Maybe try explicity giving it an empty value. <img src="myimg.jpg" alt="My Image" title="" /> ...
What do you mean with "Not themed"?jQuery UI tabs are always themed. If you want to differentiate the two different sets of tabs you coul apply your own custom _CSS...
I know you already have multiple answers. However the way you use flex is not correct. It should be added into the parent div box-inner display:flex; align-items:center; //align item center...
Play around with the CSS... Change lefts to rights, tops to bottoms... -webkit-gradient(linear, left top, right bottom,... More info on -webkit-gradient...
L.mapbox.featureLayer inherits from L.mapbox.featureGroup. And to add (or bind) a popup to a featureGroup you'll want something like this allMyIcons = L.mapbox.featureLayer().loadURL("/updatedIcons"); allMyIcons.bindPopup("Howdy!"); allMyIcons.addTo(map); If you would rather each marker/icon...
What I do is I wrap the field with a div with the class carrier-wave-field, then I can do something like this .carrier-wave-field input { color: red; /*or whatever you...
Just do something like below. .media td:first-of-type { background: red; } .media td:last-of-type { background: green; } <table cellspacing="0" cellpadding="0" border="0" style="border- collapse: collapse; width:100%; table-layout:fixed;"> <tbody> <tr> <td>some content</td>...
CSS's font-family doesn't allow specifying more than one generic font keyword in a single font family name, so you'll either have to go with monospace or sans-serif.
CKEDITOR.addCss accepts string as a parameter, so there's no way to pass any path there. CKEDITOR.document.appendStyleSheet is correct though (fiddle): CKEDITOR.replace( 'editor', { on: { instanceReady: function() { this.document.appendStyleSheet( 'http://path.to.your.css'...
The reason your button is not blue is because you are not declaring a webkit gradient. I had a look at your stylesheet. Add the correct prefix for various browsers...
You should make that thing into li's. HTML: <ul class="usps"> <li>Denver’s Only LOCAL Ad Posting Service.</li> <li>Your first week of ad posting is FREE!!! We are that confident of our...
Well add this inside your TDs class="menu-item" onclick="selectMenu($(this))" Then use this javascript code, you must include fist of all jquery.min.js function selectMenu(e){ $('.menu-item').removeClass('clicked'); e.addClass('clicked'); } Add this css too .clicked{...
Yes sprites are good. Having your sprite image is most of the work in my opinion. You can now access your sprite with a bit of css. See here for...
Have you tried something like this? <div class="row"> <div class="col-sm-4"> <div class="form-group"> @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.EditorFor(model => model.Name, new {...
Fiddle Up, You can see it here. Hope it help. EDIT: Html: <div class="a"> <span class="abs">Title here?</span> <div class="b"> Hello. </div> </div> Css: div.a { border-top: 10px solid #333; border-left:...
You can first check out this: http://www.w3schools.com/css/css_align.asp If it doesnt work for you, position manually: http://www.w3schools.com/css/pr_class_position.asp ...
Not much of a mystery: #main #side { border-top: 15px solid white; } Remove this style and it will take care of the line....
I found the solution: in the general menu -> content types option I can add a file association to the css content type.
I think you can create a rule for navbar-right. Just add these css; .navbar-right{ float: right; margin-top: 10px; } ...
If you want to set both select's to the same width use: select { width: 50% } Your example set's the width to 50% on the second select....
You have tried in the right way. Only additional thing is you can minimize the html structure and use nth-child() property HTML <ul class="ordering"> <li><span></span>One</li> <li><span></span>Two</li> <li><span></span>Three</li> </ul> CSS...
So I'm not sure exactly why your focus code wasn't working, but in general, this is just better practice. Typically you want the css to handle all of the styling...
Your error just says that there is no favicon.ico on your server. It's nothing related to your code. By default html looks for the favicon on the / and with...
Check this JSFiddle : http://jsfiddle.net/D5sdT/ The key points are : Make <a> tag display : block. This will allow <a> to occupy complete horizontal space as li Remove padding and...
Why don't you try downloading a grid-only, customized to 7 columns, bootstrap ? You may want Grid system and Layout Here : http://twitter.github.com/bootstrap/customize.html Then you just add your own selector...
.left { width: 40%; padding: 20px; display: table-cell; vertical-align: middle; } removing" float:left " from .left style solves that issue, but using table and div together is not that good.Working...
You could append a style to your <head> element, targeting all elements (seeing as font family would only apply to text elements anyway). So, in your javascript, you would append...
<div> elements are block-level which fill the entire space of their containing block. You could float divs and then clear the float for each one to decrease the width of...
Try this * { padding: 0px; margin: 0px; } #wrap { width: 100%; margin: 0px auto; margin: 0px auto; } ul { background: navy; overflow: hidden; } ul li {...
Try this: Remove the class='row_{$row}' from td and put it to tr tag Then replace this part of your css: /**/ .row_0 { background-color: #424140; padding: 3px 5px 3px 5px;...