Button styled in Bootstrap design just like a hyperlink

I am trying to make a button look exactly like a link. Here's my progress so far:

https://i.sstatic.net/1ROf6.png

<p>Hello <a href="aoeu">how</a> are you</p>
<p>Hello <button class="btn btn-link p-0 m-0 d-inline">how</button> are you</p>

https://codepen.io/anon/pen/ZqvjyJ

Is it possible to achieve this?

Answer №1

All you have to do is include the align-baseline class...

<button class="btn btn-link p-0 m-0 d-inline align-baseline">how</button>

https://codepen.io/anon/pen/dgJjdr

Answer №2

Issue resolved, please review the updated code snippet below.

HTML:

<p>Hello <a href="aoeu">how</a> are you</p>
<p>Hello <button class="btn btn-link p-0 m-0 d-inline">how</button> are you</p>

CSS

p .btn-link {
    vertical-align: baseline;
}

Explore the CodePen link for more details.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I am facing an issue where the data in my bootstrap model is not displaying correctly

After adding a search button connected to my database, I encountered an issue where the result data is not displayed on the Bootstrap model upon the first click. Instead, the page auto-refreshes without opening the modal. To view the data on the Bootstra ...

Is there a way to modify a button's aspect ratio when it is clicked?

Currently, I am utilizing the MUI v5 AppBar to craft a navigation bar with Tabs. My aim is to have the background of the Tab blend seamlessly with the main page background upon being clicked, as illustrated here: https://i.sstatic.net/e4bDn.png However, a ...

The dataTable plugin is malfunctioning, displaying all records on a single page when it should only show 10 per page

I utilized the dataTable plugin to format my HTML table, but unfortunately it is not displaying the results as expected. Instead of showing 10 records per page, it is displaying all records at once. I even tried setting "iDisplayLength: 10" but it didn&apo ...

Adjust the dimensions of the icon

My current project involves creating a sidebar with icons and associated text to represent each icon. However, I encountered an issue while trying to adjust the size of the icons within the sidebar using the "useStyles()" method. For some reason, the size ...

What is the best way to begin the main page content below the stationary header in order to prevent any overlap with the hyperlink section?

I have created this HTML page, but I am facing an issue where the hyperlinked sections overlap with the static header when clicked on. I want all linked sections to appear below the header and each section to have different dimensions within the iframe. I ...

How can I detect click events in individual button-like areas on an image sprite using JQM?

When using Jquery Mobile, imagine having 2 button-like elements in an image sprite. These buttons need to be custom buttons within the image sprite: --------- | button1 | --------- | button2 | --------- 1.) How can I detect click events for each butto ...

Trouble arises when implementing a nested flex layout in Angular Material shorthand

I'm having trouble identifying the issue with this particular layout. My goal is to maintain a Single Page Application layout where the "deepest" component only becomes scrollable if the viewport height is too small, as indicated in the snippet by us ...

Identifying the Operating System and Applying the Appropriate Stylesheet

I am trying to detect the Windows operating system and assign a specific stylesheet for Windows only. Below is the code snippet I have been using: $(function() { if (navigator.appVersion.indexOf("Win")!=-1) { $(document ...

Disabling Sidebars on Blog Articles Exclusively for Mobile Devices

I own the website Onthecomeupartists.com and am currently using the Impreza Theme 2.10 on WordPress 4.5.2. However, I want to enhance the mobile compatibility of my site by removing the sidebar on blog posts when viewed on mobile devices only, while keepin ...

Exploring the Angular Heroes tutorial with the unique app-heroes CSS selector

While going through the Angular tutorial at https://angular.io/tutorial/toh-pt1#selector, one particular sentence caught my attention: "The CSS element selector, 'app-heroes', matches the name of the HTML element that identifies this component wi ...

What is the best way to add a specific class to another class in my CSS code?

Is it possible to apply a CSS class defined in css1.css to another HTML class defined in css2.css? In css1.css: div.classPredefined { border: solid 1px #000; } In css2.css: div.newClass { background: #CCC; /*apply-class: classPredefined;*/ } Although ...

Text on Bootstrap buttons does not adapt to different screen sizes

https://i.sstatic.net/9Hc9w.png I've been struggling to make the button text responsive, but all my attempts have failed. Below is the HTML code I've been using: <button style="margin-top : 5px;" type="submit" class="btn btn-primary ...

Is there a way to automatically extend my content to fill the space on the page below the Material UI AppBar?

I am currently using React and Material UI React to develop my application. My goal is to implement the AppBar component with content underneath, without causing the entire page to scroll. I want the content to occupy the maximum remaining height and the f ...

Animate numbers in response to scroll with JQuery

I am currently working on a project where I need to create a counter that triggers at a specific scroll value. Essentially, I want users to see animated numbers incrementing from 0 to a pre-defined number once they reach a certain point while scrolling. H ...

Utilize Sass @extend to incorporate imported CSS files in the build process

In my development setup, I have a global CSS file that houses all of the generic CSS styles. My goal is to extend the classes from this global CSS file in any of my SCSS files. However, when I attempt to do so, I encounter an error stating that the .xyz c ...

What is the method for adjusting a "column" of spans to align with the right side?

I need help with aligning the first "column" of spans to the right using only spans instead of divs. Here is the link to my fiddle: http://jsfiddle.net/f6a01v9a/1/ <h4>How to align first "column" of spans to the right?:</h4> <span style=" ...

Modify font color in collapsed state of bootstrap navbar dropdown

I've been attempting to modify the font color displayed in the image to ensure it stands out clearly. https://i.sstatic.net/e6VdG.png This is a simple bootstrap 3 navbar. Here's the HTML code: <nav class="navbar navbar-custom"> ...

The left and right boxes have the same background color, but the left box is filled with lots of content while the right box only has a small

For my layout, I am using two boxes - a left_box with float:left property, and a right_box also with float:left property. The left box contains a lot of content and images, while the right box has only some content and images. Initially, everything was wo ...

Sort an HTML table based on concealed data

I've encountered a challenge with my HTML table that utilizes the Bootstrap table library for sorting data by column values. While it works smoothly for float or int data types, I have a specific column dedicated to displaying times in a string format ...

Creating a visually appealing multi-bar chart in AngularJS: Tips for effectively presenting data

Imagine that I have the JSON data below: [ { month: "Jan", cost: 80, energy: 90 }, { month: "Feb", cost: 50, energy: 80 }, { month: ...